Density Logspline Learner
mlr_learners_dens.logspline.Rd
Density logspline learner.
Calls logspline::logspline()
from logspline.
Meta Information
Task type: “dens”
Predict Types: “pdf”, “cdf”
Feature Types: “integer”, “numeric”
Required Packages: mlr3, mlr3proba, mlr3extralearners, logspline
Parameters
Id | Type | Default | Levels | Range |
lbound | numeric | - | \((-\infty, \infty)\) | |
ubound | numeric | - | \((-\infty, \infty)\) | |
maxknots | numeric | 0 | \([0, \infty)\) | |
knots | untyped | - | - | |
nknots | numeric | 0 | \([0, \infty)\) | |
penalty | untyped | - | - | |
silent | logical | TRUE | TRUE, FALSE | - |
mind | numeric | -1 | \((-\infty, \infty)\) | |
error.action | integer | 2 | \([0, 2]\) |
References
Kooperberg, Charles, Stone, J C (1992). “Logspline density estimation for censored data.” Journal of Computational and Graphical Statistics, 1(4), 301–328.
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3proba::LearnerDens
-> LearnerDensLogspline
Examples
# Define the Learner
learner = mlr3::lrn("dens.logspline")
print(learner)
#> <LearnerDensLogspline:dens.logspline>: Logspline Density Estimation
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, logspline
#> * Predict Types: [pdf], cdf
#> * Feature Types: integer, numeric
#> * Properties: -
# Define a Task
task = mlr3::tsk("faithful")
# Create train and test set
ids = mlr3::partition(task)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
print(learner$model)
#> LogsplineDens()
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> dens.logloss
#> 0.9786864