Description Usage Arguments Examples
plots the RBP curve
1 2 3 4 |
obj |
[ |
main |
[ |
xlab |
[ |
ylab |
[ |
type |
[ |
ylim |
[ |
x.adj |
[ |
y.adj |
[ |
cond.axis |
[ |
title.line |
[ |
add |
[ |
... |
[any] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Download data
mydata = getTaskData(pid.task)
head(mydata)
# Build logit model and plot RBP curve
mylogit <- glm(diabetes ~ ., data = mydata, family = "binomial")
y = mydata$diabetes
pred1 = predict(mylogit, type="response")
obj1 = makeRBPObj(pred1, y)
plotRBPCurve(obj1, cond.axis = TRUE, type = "b")
## Not run:
# Build logit model using mlr and plot RBP curve
task = pid.task
lrn = makeLearner("classif.logreg", predict.type = "prob")
tr = train(lrn, task)
pred2 = getPredictionProbabilities(predict(tr, task))
obj2 = makeRBPObj(pred2, y)
plotRBPCurve(obj2, cond.axis = TRUE, type = "b", col = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.