Description Usage Arguments Details Value See Also Examples
View source: R/array_of_hit_and_false_alarms_from_vector.R
Return value is a three dimensional array of type [C,M,Q] representing the number of confidence levels and modalities and readers, respectively. This array includes the number of hit and the number of false alarms.
Revised 2019 Nov. 20
1 |
dataList |
A list, consisting of the following R objects:
The detail of these dataset, please see the example datasets, e.g. |
The author also implemented this
in the metadata_to_fit_MRMC
which is an old version.
However, the old version uses "for
" sentences,
and it is not so better.
On the other hand,
this function use
the function aperm
()
and array
() and they are better
than "for
" sentence.
Revised 2019 Nov. 20 Revised 2019 Dec. 12
A list,
whose components are arrays of the number of hits h
and
the number of false alarms f
of dimension [c,M,Q]
.
Do not confuse [c,Q,M]
or [M,Q,C]
, etc.
Revised 2019 Nov. 20
Chi_square_goodness_of_fit_in_case_of_MRMC_Posterior_Mean
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 84 85 | #--------------------------------------------------------------------------------------
# Validation of program
#--------------------------------------------------------------------------------------
h1 <- array_of_hit_and_false_alarms_from_vector(dd)$harray
h2 <- metadata_to_fit_MRMC(dd)$harray
h1 == h2
f1 <- array_of_hit_and_false_alarms_from_vector(dd)$farray
f2 <- metadata_to_fit_MRMC(dd)$farray
f1 == f2
#--------------------------------------------------------------------------------------
# subtraction for ( hit - hit.expected)
#--------------------------------------------------------------------------------------
# In the chi square calculation,
# we need to subtract expected value of hit from hit rate,
# thus the author made this function.
## Not run:
# Prepare example data
dd <- BayesianFROC::dd
# Fit a model to data
fit <- fit_Bayesian_FROC( dataList = dd,
ite = 1111 )
# Extract a collection of expected hits as an array
harray.expected <- extract_EAP_by_array(fit,ppp)*dd$NL
# Prepare hit (TP) data as an array
harray <- array_of_hit_and_false_alarms_from_vector(dd)$harray
# Calculate the difference of hits and its expectation..
Difference <- harray - harray.expected
# The above calculation is required in the chi square goodness of fit
#======================================================================================
# array format hit and false
#======================================================================================
harray <- array_of_hit_and_false_alarms_from_vector(dataList = ddd)$harray
farray <- array_of_hit_and_false_alarms_from_vector(dataList = ddd)$farray
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.