mlr_learners_dens.pen: Density Penalized Learner

mlr_learners_dens.penR Documentation

Density Penalized Learner

Description

Density estimation using penalized B-splines with automatic selection of smoothing parameter. Calls pendensity::pendensity() from pendensity.

Dictionary

This Learner can be instantiated via lrn():

lrn("dens.pen")

Meta Information

Parameters

Id Type Default Levels Range
base character bspline bspline, gaussian -
no.base numeric 41 (-\infty, \infty)
max.iter numeric 20 (-\infty, \infty)
lambda0 numeric 500 (-\infty, \infty)
q numeric 3 (-\infty, \infty)
sort logical TRUE TRUE, FALSE -
with.border untyped - -
m numeric 3 (-\infty, \infty)
eps numeric 0.01 (-\infty, \infty)

Super classes

mlr3::Learner -> mlr3proba::LearnerDens -> LearnerDensPenalized

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
LearnerDensPenalized$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
LearnerDensPenalized$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

RaphaelS1

References

Schellhase, Christian, Kauermann, Göran (2012). “Density estimation and comparison with a penalized mixture approach.” Computational Statistics, 27(4), 757–777.

See Also

Examples


# Define the Learner
learner = mlr3::lrn("dens.pen")
print(learner)

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


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

# Score the predictions
predictions$score()


mlr-org/mlr3extralearners documentation built on Dec. 21, 2024, 2:21 p.m.