Density Smoothing Splines Learner
mlr_learners_dens.spline.Rd
Density Smoothing Splines Learner.
Calls gss::ssden()
from gss.
Meta Information
Task type: “dens”
Predict Types: “pdf”, “cdf”
Feature Types: “integer”, “numeric”
Required Packages: mlr3, mlr3proba, mlr3extralearners, gss
Parameters
Id | Type | Default | Levels | Range |
type | untyped | - | - | |
alpha | numeric | 1.4 | \((-\infty, \infty)\) | |
weights | untyped | - | - | |
na.action | untyped | stats::na.omit | - | |
id.basis | untyped | - | - | |
nbasis | integer | - | \((-\infty, \infty)\) | |
seed | numeric | - | \((-\infty, \infty)\) | |
domain | untyped | - | - | |
quad | untyped | - | - | |
qdsz.depth | numeric | - | \((-\infty, \infty)\) | |
bias | untyped | - | - | |
prec | numeric | 1e-07 | \((-\infty, \infty)\) | |
maxiter | integer | 30 | \([1, \infty)\) | |
skip.iter | logical | - | TRUE, FALSE | - |
References
Gu, Chong, Wang, Jingyuan (2003). “Penalized likelihood density estimation: Direct cross-validation and scalable approximation.” Statistica Sinica, 811–826.
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
-> LearnerDensSpline
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)
#> Error in env$fun(x, nu, env$env): gss error in phi: inputs are out of range
# Score the predictions
predictions$score()
#> Error: object 'predictions' not found