Learn R Programming

liquidSVM (version 1.2.4)

rocSVM: Receiver Operating Characteristic curve (ROC curve)

Description

This routine provides several points on the ROC curve by solving multiple weighted binary classification problems. It is only suitable to binary classification data.

Usage

rocSVM(x, y, ..., weight_steps = 9, do.select = TRUE)

Arguments

x

either a formula or the features

y

either the data or the labels corresponding to the features x. It can be a character in which case the data is loaded using liquidData. If it is of type liquidData then after training and selection the model is tested using the testing data (y$test).

...

configuration parameters, see Configuration. Can be threads=2, display=1, gpus=1, etc.

weight_steps

indicates how many weights between min_weight and max_weight will be used

do.select

if TRUE also does the whole selection for this model

Value

an object of type svm. Depending on the usage this object has also $train_errors, $select_errors, and $last_result properties.

Details

Please look at the demo-vignette (vignette('demo')) for more examples. The labels should only have value c(1,-1).

min_weight, max_weight, weight_steps: you might have to define which weighted classification problems will be considered. The choice is usually a bit tricky. Good luck ...

See Also

plotROC

Examples

Run this code
# NOT RUN {
banana <- liquidData('banana-bc')
model <- rocSVM(Y ~ ., banana$train, display=1)
plotROC(model,banana$test)

## a worked example can be seen at
vignette("demo",package="liquidSVM")
# }
# NOT RUN {
 
# }

Run the code above in your browser using DataLab