Export to GitHub

imrmc - issue #4

Adapt the code for sensitivity and specificity


Posted on Feb 1, 2014 by Massive Kangaroo

Please describe the desired enhancement

Currently imrmc produces a statistical analysis of the area under the ROC curve given observer scores of signal-absent and signal-present cases. I would like imrmc to allow the user to produce a statistical analysis of sensitivity and specificity.

OK, so this is a serious enhancement that I will try and communicate. In what follows, I'm doing my best to navigate and interpret the java code. Please correct me on language/syntax so that I can be more clear now and in the future. Also understand that I might be totally wrong. We should probably meet after you have considered the following along side the java code. Of course, there is a small chance the instructions are perfectly clear and perfectly correct to accomplish what I want!

Here's how I think the enhancement can be accomplished:

  • On line 3 to the left of the two current pull-down menus, create an input box for a floating point number 6 digits wide labeled "Threshold". I don't know where this variable belongs, but maybe it should be in the DBRecord alongside nReader, nNormal, and nDisease. Name it "Threshold". Do not enable it until an action described below happens.

  • In line 3 of the gui to the right of the two current pull-down menus, create a new pull-down menu. The lines of the menu are 0 = "Choose Figure of Merit" 1 = "AUC" 2 = "Sensitivity" 3 = "Specificity"

  • When the button "MRMC Variance Analysis" is pressed, the following actions are executed depending on the "Choose Figure of Merit" pull-down menu. 0 -> do nothing 1 -> run the current AUC analysis 2 -> run an analysis of sensitivity (new, see below) 3 -> run an analysis of specificity (new, see below)

Action from 1: Here I describe elements from the AUC analysis that are key to making changes to treat the sensitivity and specificity analyses.

I believe the standard AUC analysis refers to the "method" called makeTMatrices in InputFile.java. It cycles through all the readers and cases, checking to see if an observation exists for modality0 or modality1. Am I right calling it a "method"? I could use some tutelage on the precurser operations that yield keyedData and the data structure keyedData.

If an observation exists for modality0, then PresentMod0 = 1 currScoreMod0 = keyedData.get(r).get(c).get(modality0) Otherwise both are zero.

If an observation exists for modality1, then PresentMod1 = 1 currScoreMod1 = keyedData.get(r).get(c).get(modality1) Otherwise both are zero.

The method completes by assigning the appropriate currScore and Present indicator in several different matrices: t0, t00, t01, d0, t1, t10, t11, d1.

Action from 2: To run an analysis of sensitivity, should be pretty simple. First, enable the "Threshold" input box mentioned above, initialize the box with a value of 0.0. Next, set every element of t0, t00, t01 to the value of "Threshold" and every element of d0 to 1. I think that's it!

Action from 3: To run an analysis of specificity, should also be pretty simple. First, enable the "Threshold" input box mentioned above, initialize the box with a value of 0.0. Next, set every element of t1, t10, t11 to the value of "Threshold" and every element of d1 to 1. I think that's it!

Comment #1

Posted on Feb 1, 2014 by Massive Kangaroo

(No comment was entered for this change.)

Comment #2

Posted on Feb 1, 2014 by Massive Kangaroo

(No comment was entered for this change.)

Comment #3

Posted on Feb 27, 2014 by Massive Kangaroo

(No comment was entered for this change.)

Comment #4

Posted on Apr 9, 2014 by Massive Panda

4/9/14.

I have just merged my branch with trunk and committed my changes in GUInyterface.java and RawStudyCard.java to my branch.

Status: AssignTo_MM

Labels:
Type-Enhancement Priority-Medium