View source: R/fit_Bayesian_FROC.R
Fit and Draw the FROC models (curves).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | fit_MRMC(
dataList,
DrawCurve = FALSE,
type_to_be_passed_into_plot = "p",
verbose = TRUE,
print_CI_of_AUC = TRUE,
PreciseLogLikelihood = FALSE,
summary = TRUE,
dataList.Name = "",
prior = 1,
ModifiedPoisson = TRUE,
mesh.for.drawing.curve = 10000,
significantLevel = 0.7,
cha = 1,
war = floor(ite/5),
ite = 10000,
dig = 3,
see = 1234569,
Null.Hypothesis = FALSE,
prototype = FALSE,
model_reparametrized = FALSE,
Model_MRMC_non_hierarchical = TRUE,
ww = -0.81,
www = 0.001,
mm = 0.65,
mmm = 0.001,
vv = 5.31,
vvv = 0.001,
zz = 1.55,
zzz = 0.001,
...
)
|
dataList |
A list, specifying an FROC data to be fitted a model. It consists of data of numbers of TPs, FPs, lesions, images. .In addition, if in case of mutiple readers or mutiple modalities, then modaity ID and reader ID are included also. The For the single reader and a single modality data, the
Using this object To make this R object
Before fitting a model,
we can confirm our dataset is correctly formulated
by using the function —————————————————————————————- A Single reader and a single modality (SRSC) case. —————————————————————————————- In a single reader and a single modality case (srsc),
The detail of these dataset, see the datasets endowed with this package.
'Note that the maximal number of confidence level, denoted by data Format: A single reader and a single modality case ——————————————————————————————————
————————————————————————————————— * false alarms = False Positives = FP * hits = True Positives = TP Note that in FROC data, all confidence level means present (diseased, lesion) case only, no confidence level indicating absent. Since each reader marks his suspicious location only if he thinks lesions are present, and marked positions generates the hits or false alarms, thus each confidence level represents that lesion is present. In the absent case, reader does not mark any locations and hence, the absent confidence level does not relate this dataset. So, if reader think it is no lesion, then in such case confidence level is not needed. Note that the first column of confidence level vector ————————————————————————————— Multiple readers and multiple modalities case, i.e., MRMC case ————————————————————————————— In case of multiple readers and multiple modalities, i.e., MRMC case,
in order to apply the function
Note that the maximal number of confidence level (denoted by the function Example data. Multiple readers and multiple modalities ( i.e., MRMC) —————————————————————————————————
————————————————————————————————— * false alarms = False Positives = FP * hits = True Positives = TP | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DrawCurve |
Logical: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type_to_be_passed_into_plot |
"l" or "p". | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
verbose |
A logical, if | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
print_CI_of_AUC |
Logical, if | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PreciseLogLikelihood |
Logical, that is | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
summary |
Logical: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataList.Name |
This is not for user, but the author for this package development. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
prior |
positive integer, to select the prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ModifiedPoisson |
Logical, that is If Similarly, If For more details, see the author's paper in which I explained per image and per lesion. (for details of models, see vignettes , now, it is omiited from this package, because the size of vignettes are large.) If \frac{F_1+F_2+F_3+F_4+F_5}{N_L}, \frac{F_2+F_3+F_4+F_5}{N_L}, \frac{F_3+F_4+F_5}{N_L}, \frac{F_4+F_5}{N_L}, \frac{F_5}{N_L}, where N_L is a number of lesions (signal). To emphasize its denominator N_L, we also call it the False Positive Fraction (FPF) per lesion. On the other hand, if \frac{F_1+F_2+F_3+F_4+F_5}{N_I}, \frac{F_2+F_3+F_4+F_5}{N_I}, \frac{F_3+F_4+F_5}{N_I}, \frac{F_4+F_5}{N_I}, \frac{F_5}{N_I}, where N_I is the number of images (trial). To emphasize its denominator N_I, we also call it the False Positive Fraction (FPF) per image. The model is fitted so that
the estimated FROC curve can be ragraded
as the expected pairs of FPF per image and TPF per lesion ( or as the expected pairs of FPF per image and TPF per lesion ( If On the other hand, if So,data of FPF and TPF are changed thus, a fitted model is also changed whether Revised 2019 Dec 8 Revised 2019 Nov 25 Revised 2019 August 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mesh.for.drawing.curve |
A positive large integer, indicating number of dots drawing the curves, Default =10000. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
significantLevel |
This is a number between 0 and 1. The results are shown if posterior probabilities are greater than this quantity. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cha |
A variable to be passed to the function | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
war |
A variable to be passed to the function | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ite |
A variable to be passed to the function | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dig |
A variable to be passed to the function | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
see |
A variable to be passed to the function | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Null.Hypothesis |
Logical, that is | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
prototype |
A logical, if Σ_c H_c ≤ N_L However, this model ( if Σ_c H_c ≤ N_L. This model is theoretically perfect. However, in the practically, the calculation will generates some undesired results which caused by the so-called floo .... I forget English :'-D. The flood point??? I forgeeeeeeeeeeeeet!! Ha. So, prior synthesizes very small hit rates such as 0.0000000000000001234 and it cause the non accurate calculation such as 0.00000,,,00000123/0.000.....000012345= 0.0012 which becomes hit rate and thus OH No!. Then it synthesizes Bernoulli success rate which is not less than 1 !! To avoid this, the author should develop the theory of prior to avoid this very small numbers, however the author has idea but now it does not success. If H_5 \sim Binomial(p_5,N_L) H_4 \sim Binomial(p_4,N_L) H_3 \sim Binomial(p_3,N_L) H_2 \sim Binomial(p_2,N_L) H_1 \sim Binomial(p_1,N_L) On the other hand,
if H_5 \sim Binomial( p_5,N_L ) H_4 \sim Binomial( \frac{p_4}{1-p_5},N_L - H_5) H_3 \sim Binomial( \frac{p_3}{1-p_5-p_4},N_L - H_5-H_4) H_2 \sim Binomial( \frac{p_2}{1-p_5-p_4-p_3},N_L - H_5-H_4-H_3) H_1 \sim Binomial( \frac{p_1}{1-p_5-p_4-p_3-p_2},N_L - H_5-H_4-H_3-H_2) Each number of lesions is adjusted
so that the sum of hits Σ_c H_c is less than
the number of lesions (signals, targets) N_L.
And hence the model in case of E[H_c/N_L] = p_c, E[F_c/N_X] = q_c, where E denotes the expectation and N_X is the number of lesion or the number of images and q_c is a false alarm rate, namely, F_c \sim Poisson( q_c N_X). Using the above two equations, we can establish the alternative Bayesian FROC theory preserving classical notions and formulas. For the details, please see the author's pre print: Bayesian Models for ,,, for?? I forget my paper title .... :'-D. What the hell!? I forget,... My health is so bad to forget , .... I forget. The author did not notice that the prototype is not a generative model. And hence the author revised the model so that the model is exactly generative model. But the reason why the author remains the prototype model( SO, now, the author try to avoid such phenomenon by using priors but it now does not success. Here of course we interpret the terms such as N_L - H_5-H_4-H_3 as the remained targets after reader get hits. The author thinks it is another manner to do so like N_L -H_1-H2-H_3, but it does not be employed. Since the author thinks that the reader will assign his suspicious lesion location from high confidence level and in this view point the author thinks it should be considered that targets are found from the highest confidence suspicious location. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
model_reparametrized |
A logical, if TRUE, then a model under construction is used. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Model_MRMC_non_hierarchical |
A logical.
If | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ww |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
www |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mm |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mmm |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
vv |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
vvv |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
zz |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
zzz |
Each of which is a real number specifying one of the parameter of prior | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... |
Additional arguments |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.