Accelerated oblique random regression forest.
Calls aorsf::orsf() from aorsf.
Note that although the learner has the property "missing" and it can in
principle deal with missing values, the behaviour has to be configured using
the parameter na_action.
Initial parameter values
n_thread: This parameter is initialized to 1 (default is 0) to avoid conflicts with the mlr3 parallelization.pred_simplifyhas to be TRUE, otherwise response is NA in prediction
Meta Information
Task type: “regr”
Predict Types: “response”
Feature Types: “integer”, “numeric”, “factor”, “ordered”
Required Packages: mlr3, mlr3extralearners, aorsf
Parameters
| Id | Type | Default | Levels | Range |
| attach_data | logical | TRUE | TRUE, FALSE | - |
| epsilon | numeric | 1e-09 | \([0, \infty)\) | |
| importance | character | anova | none, anova, negate, permute | - |
| importance_max_pvalue | numeric | 0.01 | \([1e-04, 0.9999]\) | |
| leaf_min_events | integer | 1 | \([1, \infty)\) | |
| leaf_min_obs | integer | 5 | \([1, \infty)\) | |
| max_iter | integer | 20 | \([1, \infty)\) | |
| method | character | glm | glm, net, pca, random | - |
| mtry | integer | NULL | \([1, \infty)\) | |
| mtry_ratio | numeric | - | \([0, 1]\) | |
| n_retry | integer | 3 | \([0, \infty)\) | |
| n_split | integer | 5 | \([1, \infty)\) | |
| n_thread | integer | - | \([0, \infty)\) | |
| n_tree | integer | 500 | \([1, \infty)\) | |
| na_action | character | fail | fail, impute_meanmode | - |
| net_mix | numeric | 0.5 | \((-\infty, \infty)\) | |
| oobag | logical | FALSE | TRUE, FALSE | - |
| oobag_eval_every | integer | NULL | \([1, \infty)\) | |
| oobag_fun | untyped | NULL | - | |
| oobag_pred_type | character | mean | none, leaf, mean | - |
| pred_aggregate | logical | TRUE | TRUE, FALSE | - |
| sample_fraction | numeric | 0.632 | \([0, 1]\) | |
| sample_with_replacement | logical | TRUE | TRUE, FALSE | - |
| scale_x | logical | FALSE | TRUE, FALSE | - |
| split_min_events | integer | 5 | \([1, \infty)\) | |
| split_min_obs | integer | 10 | \([1, \infty)\) | |
| split_min_stat | numeric | NULL | \([0, \infty)\) | |
| split_rule | character | variance | variance | - |
| target_df | integer | NULL | \([1, \infty)\) | |
| tree_seeds | integer | NULL | \([1, \infty)\) | |
| verbose_progress | logical | FALSE | TRUE, FALSE | - |
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 -> mlr3::LearnerRegr -> LearnerRegrObliqueRandomForest
Methods
Inherited methods
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerRegr$predict_newdata_fast()
Method oob_error()
OOB concordance error extracted from the model slot
eval_oobag$stat_values
Examples
# Define the Learner
learner = lrn("regr.aorsf")
print(learner)
#>
#> ── <LearnerRegrObliqueRandomForest> (regr.aorsf): Oblique Random Forest Regresso
#> • Model: -
#> • Parameters: n_thread=1
#> • Packages: mlr3, mlr3extralearners, and aorsf
#> • Predict Types: [response]
#> • Feature Types: integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: importance, missings, oob_error, and weights
#> • Other settings: use_weights = 'use'
# Define a Task
task = tsk("mtcars")
# Create train and test set
ids = partition(task)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
print(learner$model)
#> ---------- Oblique random regression forest
#>
#> Linear combinations: Linear regression
#> N observations: 21
#> N trees: 500
#> N predictors total: 10
#> N predictors per node: 4
#> Average leaves per tree: 3.256
#> Min observations in leaf: 5
#> OOB stat value: 0.68
#> OOB stat type: RSQ
#> Variable importance: anova
#>
#> -----------------------------------------
print(learner$importance())
#> cyl disp wt hp qsec gear carb
#> 0.14150943 0.10826211 0.08791209 0.05934718 0.05769231 0.03560831 0.03384615
#> vs am drat
#> 0.02388060 0.02034884 0.01197605
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> regr.mse
#> 13.29896