Skip to contents

Local density estimation. Calls locfit::density.lf() from locfit.

Dictionary

This Learner can be instantiated via lrn():

lrn("dens.locfit")

Meta Information

Parameters

IdTypeDefaultLevelsRange
windowcharactergaustcub, rect, trwt, tria, epan, bisq, gaus-
widthnumeric-\((-\infty, \infty)\)
fromnumeric-\((-\infty, \infty)\)
tonumeric-\((-\infty, \infty)\)
cutnumeric-\((-\infty, \infty)\)
degnumeric0\((-\infty, \infty)\)
linkcharacteridentident, log, logit, inverse, sqrt, arcsin-
kerncharactertcubrect, trwt, tria, epan, bisq, gauss, tcub-
ktcharactersphsph, prod-
renormlogicalFALSETRUE, FALSE-
maxkinteger100\([0, \infty)\)
itypecharacter-prod, mult, mlin, haz-
mintinteger20\([1, \infty)\)
maxitinteger20\([1, \infty)\)

References

Loader, Clive (2006). Local regression and likelihood. Springer Science & Business Media.

See also

Author

RaphaelS1

Super classes

mlr3::Learner -> mlr3proba::LearnerDens -> LearnerDensLocfit

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

LearnerDensLocfit$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("dens.locfit")
print(learner)
#> <LearnerDensLocfit:dens.locfit>: Local Density Estimation
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, mlr3proba, mlr3extralearners, locfit
#> * Predict Types:  [pdf]
#> * 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)
#> LocFitDens() 


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

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