| PredictionDens {mlr3proba} | R Documentation |
This object stores the predictions returned by a learner of class LearnerDens.
The task_type is set to "dens".
mlr3::Prediction -> PredictionDens
pdf(numeric())
Access the stored predicted probability density function.
cdf(numeric())
Access the stored predicted cumulative distribution function.
new()Creates a new instance of this R6 class.
PredictionDens$new( task = NULL, row_ids = task$row_ids, pdf = NULL, cdf = NULL, check = TRUE )
task(TaskSurv)
Task, used to extract defaults for row_ids.
row_ids(integer())
Row ids of the predicted observations, i.e. the row ids of the test set.
pdf(numeric())
Numeric vector of estimated probability density function, evaluated at values in test set.
One element for each observation in the test set.
cdf(numeric())
Numeric vector of estimated cumulative distribution function, evaluated at values in test
set. One element for each observation in the test set.
check(logical(1))
If TRUE, performs argument checks and predict type conversions.
clone()The objects of this class are cloneable with this method.
PredictionDens$clone(deep = FALSE)
deepWhether to make a deep clone.
Other Prediction:
PredictionSurv
library(mlr3)
task = mlr_tasks$get("precip")
learner = mlr_learners$get("dens.hist")
p = learner$train(task)$predict(task)
head(as.data.table(p))