mlr_learners_regr.cubist | R Documentation |
Rule-based model that is an extension of Quinlan's M5 model tree. Each tree contains
linear regression models at the terminal leaves.
Calls Cubist::cubist()
from Cubist.
This Learner can be instantiated via lrn():
lrn("regr.cubist")
Task type: “regr”
Predict Types: “response”
Feature Types: “integer”, “numeric”, “character”, “factor”, “ordered”
Required Packages: mlr3, mlr3extralearners, Cubist
Id | Type | Default | Levels | Range |
committees | integer | - | [1, 100] |
|
unbiased | logical | FALSE | TRUE, FALSE | - |
rules | integer | 100 | [1, \infty) |
|
extrapolation | numeric | 100 | [0, 100] |
|
sample | integer | 0 | [0, \infty) |
|
seed | integer | - | (-\infty, \infty) |
|
label | untyped | "outcome" | - | |
neighbors | integer | - | [0, 9] |
|
mlr3::Learner
-> mlr3::LearnerRegr
-> LearnerRegrCubist
new()
Creates a new instance of this R6 class.
LearnerRegrCubist$new()
clone()
The objects of this class are cloneable with this method.
LearnerRegrCubist$clone(deep = FALSE)
deep
Whether to make a deep clone.
sumny
Quinlan, R J, others (1992). “Learning with continuous classes.” In 5th Australian joint conference on artificial intelligence, volume 92, 343–348. World Scientific.
Quinlan, Ross J (1993). “Combining instance-based and model-based learning.” In Proceedings of the tenth international conference on machine learning, 236–243.
Dictionary of Learners: mlr3::mlr_learners.
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.
# Define the Learner
learner = mlr3::lrn("regr.cubist")
print(learner)
# Define a Task
task = mlr3::tsk("mtcars")
# 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.