Description Usage Arguments Value Note Author(s) See Also
View source: R/tdmModelingUtils.r
Calculate confusion matrix, gain and RGain measure.
1 | tdmModConfmat(d, colreal, colpred, opts, predProb = NULL)
|
d |
data frame |
colreal |
name of column in d which contains the real class |
colpred |
name of column in d which contains the predicted class |
opts |
a list from which we use the elements:
|
predProb |
if not NULL, a data frame with as many rows as data frame |
cm
, a list containing:
mat |
matrix with real class levels as rows, predicted class levels columns. |
cerr |
class error rates, vector of size nlevels(colreal)+1. |
gain |
the total gain (sum of pointwise product |
gain.vector |
gain.vector[X] is the gain attributed to real class label X. gain.vector["Total"] is again the total gain. |
gainmax |
the maximum achievable gain, assuming perfect prediction |
rgain |
Depending on the value of |
For all measures rgain
holds: The higher, the better.
The last four elements of opts$rgain.type=
"bYouden","arROC",
"arLIFT","arPre"
are only available for binary classification.
For case "bYouden"
:
sensitivity = TP/(TP+FN)
specificity = TN/(TN+FP)
Wolfgang Konen (wolfgang.konen@th-koeln.de), Patrick Koch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.