tests/testthat/helper_objects.R

# make learner
lrn = makeLearner("classif.logreg")
lrn = setPredictType(lrn, "prob")
r = holdout(lrn, pid.task, show.info = FALSE)

# get predictions
pred = getPredictionProbabilities(r$pred)
y = r$pred$data$truth
positive = pid.task$task.desc$positive

# RBP object
obj = makeRBPObj(pred,  y)
tf = c(TRUE, FALSE)

Try the RBPcurve package in your browser

Any scripts or data that you put into this service are public.

RBPcurve documentation built on May 1, 2019, 6:31 p.m.