Skip to contents

Density Smoothing Splines Learner. Calls gss::ssden() from gss.

Dictionary

This Learner can be instantiated via lrn():

lrn("dens.spline")

Meta Information

Parameters

IdTypeDefaultLevelsRange
typeuntyped--
alphanumeric1.4\((-\infty, \infty)\)
weightsuntyped--
na.actionuntypedstats::na.omit-
id.basisuntyped--
nbasisinteger-\((-\infty, \infty)\)
seednumeric-\((-\infty, \infty)\)
domainuntyped--
quaduntyped--
qdsz.depthnumeric-\((-\infty, \infty)\)
biasuntyped--
precnumeric1e-07\((-\infty, \infty)\)
maxiterinteger30\([1, \infty)\)
skip.iterlogical-TRUE, FALSE-

References

Gu, Chong, Wang, Jingyuan (2003). “Penalized likelihood density estimation: Direct cross-validation and scalable approximation.” Statistica Sinica, 811–826.

See also

Author

RaphaelS1

Super classes

mlr3::Learner -> mlr3proba::LearnerDens -> LearnerDensSpline

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

LearnerDensSpline$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("dens.spline")
print(learner)
#> <LearnerDensSpline:dens.spline>: Density Smoothing Splines
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, gss
#> * Predict Types:  [pdf], cdf
#> * Feature Types: integer, numeric
#> * Properties: missings

# 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)
#> splineDens() 


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> dens.logloss 
#>      1.06128