plot_empirical_FROC_curves: Plot empirical FROC Curves by traditional ways of 'ggplot2'

Description Usage Arguments Value Examples

View source: R/DrawCurves.R

Description

Plot empirical FROC Curves.

Usage

1
2
3
4
5
6
7
8
9
plot_empirical_FROC_curves(
  dataList.MRMC,
  ModifiedPoisson = FALSE,
  colored_by_modality = TRUE,
  numbered_by_modality = TRUE,
  cex = 1.3,
  modalityID = c(1, dataList.MRMC$M),
  readerID = c(1, dataList.MRMC$Q)
)

Arguments

dataList.MRMC

A list, indicating FROC data of MRMC. See also dataList which is a variable of the function fit_Bayesian_FROC().

ModifiedPoisson

Logical, that is TRUE or FALSE.

If ModifiedPoisson = TRUE, then Poisson rate of false alarm is calculated per lesion, and a model is fitted so that the FROC curve is an expected curve of points consisting of the pairs of TPF per lesion and FPF per lesion.

Similarly,

If ModifiedPoisson = TRUE, then Poisson rate of false alarm is calculated per image, and a model is fitted so that the FROC curve is an expected curve of points consisting of the pair of TPF per lesion and FPF per image.

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 ModifiedPoisson = TRUE, then the False Positive Fraction (FPF) is defined as follows (F_c denotes the number of false alarms with confidence level c )

\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 ModifiedPoisson = FALSE (Default), then False Positive Fraction (FPF) is given by

\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 (ModifiedPoisson = FALSE )

or as the expected pairs of FPF per image and TPF per lesion (ModifiedPoisson = TRUE)

If ModifiedPoisson = TRUE, then FROC curve means the expected pair of FPF per lesion and TPF.

On the other hand, if ModifiedPoisson = FALSE, then FROC curve means the expected pair of FPF per image and TPF.

So,data of FPF and TPF are changed thus, a fitted model is also changed whether ModifiedPoisson = TRUE or FALSE. In traditional FROC analysis, it uses only per images (trial). Since we can divide one image into two images or more images, number of trial is not important. And more important is per signal. So, the author also developed FROC theory to consider FROC analysis under per signal. One can see that the FROC curve is rigid with respect to change of a number of images, so, it does not matter whether ModifiedPoisson = TRUE or FALSE. This rigidity of curves means that the number of images is redundant parameter for the FROC trial and thus the author try to exclude it.

Revised 2019 Dec 8 Revised 2019 Nov 25 Revised 2019 August 28

colored_by_modality

A logical, if TRUE, then the color in the scatter plot means modality ID. If not, then the each color in the scatter plot indicates reader ID.

numbered_by_modality

A logical, if TRUE, then the number in the scatter plot means modality ID. If not, then the each number in the scatter plot indicates reader ID.

cex

A positive real number, specifying the size of dots in the resulting plot.

modalityID

A vector of integer, specifying modality ID to be drawn.

readerID

A vector of integer, specifying modality ID to be drawn.

Value

An object made by ggplot2, I am not sure what it is.

Examples

 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
## Not run: 
#========================================================================================
#                               The 1-st example
#========================================================================================


plot_empirical_FROC_curves(dd,readerID = 1:4,modalityID = 1:5)
plot_empirical_FROC_curves(dd,readerID = 1,modalityID = c(4,3))
plot_empirical_FROC_curves(dd,readerID = 2,modalityID = c(4,3))
plot_empirical_FROC_curves(dd,readerID = 3,modalityID = c(4,3))
plot_empirical_FROC_curves(dd,readerID = 4,modalityID = c(4,3))







#========================================================================================
#                               The  example
#========================================================================================


     v  <- v_truth_creator_for_many_readers_MRMC_data(M=2,Q=37)
 m  <- mu_truth_creator_for_many_readers_MRMC_data(M=2,Q=37)
 d  <- create_dataList_MRMC(mu.truth = m,v.truth = v)


    plot_empirical_FROC_curves(d,readerID = 1:14,modalityID = 1:2)


    plot_empirical_FROC_curves(d,readerID = 1:24,modalityID = 1:2)


    plot_empirical_FROC_curves(d,readerID = 1:34,modalityID = 1:2)



#========================================================================================
#                               The  example
#========================================================================================



v  <- v_truth_creator_for_many_readers_MRMC_data(M=2,Q=7)
m  <- mu_truth_creator_for_many_readers_MRMC_data(M=2,Q=7)
d  <- create_dataList_MRMC(mu.truth = m,v.truth = v)


plot_empirical_FROC_curves(d,readerID = 1,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 2,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 3,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 4,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 5,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 6,modalityID = 1:2)
plot_empirical_FROC_curves(d,readerID = 7,modalityID = 1:2)

#========================================================================================
#                               The  example
#========================================================================================


plot_empirical_FROC_curves(dd)
plot_empirical_FROC_curves(dd,modalityID = c(3,5))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,4))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,3))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,2,3))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,2,3))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(3))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,2,3))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(1,2))
plot_empirical_FROC_curves(dd,modalityID = c(3,5),readerID = c(2))
plot_empirical_FROC_curves(dd,modalityID = c(3),readerID = c(2))
plot_empirical_FROC_curves(dd,modalityID = c(5),readerID = c(2))








## End(Not run)

BayesianFROC documentation built on Jan. 23, 2022, 9:06 a.m.