Skip to contents

Density logspline learner. Calls logspline::logspline() from logspline.

Dictionary

This Learner can be instantiated via lrn():

lrn("dens.logspline")

Meta Information

Parameters

IdTypeDefaultLevelsRange
lboundnumeric-\((-\infty, \infty)\)
uboundnumeric-\((-\infty, \infty)\)
maxknotsnumeric0\([0, \infty)\)
knotsuntyped--
nknotsnumeric0\([0, \infty)\)
penaltyuntyped--
silentlogicalTRUETRUE, FALSE-
mindnumeric-1\((-\infty, \infty)\)
error.actioninteger2\([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

Author

RaphaelS1

Super classes

mlr3::Learner -> mlr3proba::LearnerDens -> LearnerDensLogspline

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerDensLogspline$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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