Description Usage Arguments Value See Also Examples
Single plot of ROC, lift or other chart for a TDMclassifier
object.
1 2 3 4 5 6 7 8 | tdmROCRbase(
x,
dataset = "validation",
nRun = 1,
typ = "ROC",
noPlot = FALSE,
...
)
|
x |
return value from a prior call to |
dataset |
["validation"] which part of the data to use, either "training" or "validation" |
nRun |
[1] if x contains multiple runs, which run to show (1,..., |
typ |
["ROC"] which chart type, one out of ("ROC","lift","precRec") for
(ROC, lift, precision-recall)-chart (see
|
noPlot |
[FALSE] if TRUE, suppress the plot, return only the area under curve |
... |
currently not used |
The area between the curve and the bottom line y=0.0 in the case of typ=="ROC" | typ=="precRec"
or the area between the curve and the bottom line y=1.0 in the case of typ=="lift"
.
If object x
does not contain a prediction score, a warning is issued and the return value is NULL.
tdmClassifyLoop
tdmROCR.TDMclassifier
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 | #*# --------- demo/demo05ROCR.r ---------
#*# Run task SONAR with "area under ROC curve" as performance measure (rgain.type="arROC").
#*# Other settings are similar to demo01-1sonar.r (level 1 of TDMR).
#*# Finally, plot ROC curve for validataion data set and
#+# plot lift chart for training data set
#*#
path <- paste(find.package("TDMR"), "demo02sonar",sep="/");
#path <- paste("../inst", "demo02sonar",sep="/");
source(paste(path,"main_sonar.r",sep="/")); # defines readTrnSonar
controlDM <- function() {
#
# settings for the DM process (former sonar_00.apd file):
# (see ?tdmOptsDefaultsSet for a complete list of all default settings
# and many explanatory comments)
#
opts = list(path = path,
dir.data = "data", # relative to path
filename = "sonar.txt",
READ.TrnFn = readTrnSonar, # defined in main_sonar.r
data.title = "Sonar Data",
NRUN = 1,
rgain.type = "arROC",
VERBOSE = 2
);
opts <- setParams(opts, defaultOpts(), keepNotMatching = TRUE);
}
opts <- controlDM();
result <- main_sonar(opts);
tdmGraphicNewWin(opts);
cat("Area under ROC-curve for validation data set: ",
tdmROCRbase(result),"\n"); # side effect: plot ROC-curve
tdmGraphicNewWin(opts);
cat("Area under lift curve for training data set: ",
tdmROCRbase(result,dataset="training",typ="lift"),"\n"); # side effect: plot lift chart
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.