diff --git a/404.html b/404.html index edcb053a..9241553b 100644 --- a/404.html +++ b/404.html @@ -17,8 +17,8 @@ - - + +
Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners for 'mlr3'. -R package version 0.8.0, +R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.
@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, - note = {R package version 0.8.0, + note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }
NEWS.md
CRAN release: 2024-11-23
$loglik()
lrn("classif.ranger")
lrn("regr.ranger")
na.action
"missings"
poisson
poisson.tau
CRAN release: 2024-10-25
alpha
minprop
respect.unordered.factors
max_depth
se.method
LearnerClassifLogReg$loglik()
LearnerClassifLogReg$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -223,7 +224,7 @@ Examples#> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: loglik, twoclass, weights +#> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> diff --git a/reference/mlr_learners_classif.multinom.html b/reference/mlr_learners_classif.multinom.html index 8154599e..78129340 100644 --- a/reference/mlr_learners_classif.multinom.html +++ b/reference/mlr_learners_classif.multinom.html @@ -1,5 +1,5 @@ -Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom • mlr3learnersMultinomial log-linear learner via neural networks — mlr_learners_classif.multinom • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -120,6 +120,7 @@ Public methodsLearnerClassifMultinom$loglik() LearnerClassifMultinom$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -197,7 +198,7 @@ Examples#> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor -#> * Properties: loglik, multiclass, twoclass, weights +#> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 diff --git a/reference/mlr_learners_classif.naive_bayes.html b/reference/mlr_learners_classif.naive_bayes.html index bcbe8eb2..41a0a917 100644 --- a/reference/mlr_learners_classif.naive_bayes.html +++ b/reference/mlr_learners_classif.naive_bayes.html @@ -1,5 +1,5 @@ -Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes • mlr3learnersNaive Bayes Classification Learner — mlr_learners_classif.naive_bayes • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -119,6 +119,7 @@ Public methodsLearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.nnet.html b/reference/mlr_learners_classif.nnet.html index 33e887c7..5ef38932 100644 --- a/reference/mlr_learners_classif.nnet.html +++ b/reference/mlr_learners_classif.nnet.html @@ -1,5 +1,5 @@ -Classification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersClassification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -69,7 +69,7 @@ Meta InformationTask type: “classif” Predict Types: “response”, “prob” -Feature Types: “integer”, “numeric”, “factor”, “ordered” +Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet @@ -147,6 +147,7 @@ Public methodsLearnerClassifNnet$new() LearnerClassifNnet$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.qda.html b/reference/mlr_learners_classif.qda.html index 44b905c4..97e41ad7 100644 --- a/reference/mlr_learners_classif.qda.html +++ b/reference/mlr_learners_classif.qda.html @@ -1,5 +1,5 @@ -Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learnersQuadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -133,6 +133,7 @@ Public methodsLearnerClassifQDA$new() LearnerClassifQDA$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.ranger.html b/reference/mlr_learners_classif.ranger.html index 63acfcc0..57a25cb6 100644 --- a/reference/mlr_learners_classif.ranger.html +++ b/reference/mlr_learners_classif.ranger.html @@ -1,5 +1,5 @@ -Ranger Classification Learner — mlr_learners_classif.ranger • mlr3learnersRanger Classification Learner — mlr_learners_classif.ranger • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -62,7 +62,9 @@ Custom mlr3 parametersInitial parameter values -num.threads:Actual default: NULL, triggering auto-detection of the number of CPUs. +num.threads:Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order. Adjusted value: 1. Reason for change: Conflicting with parallelization via future. @@ -87,7 +89,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0.5\((-\infty, \infty)\)always.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([0, \infty)\)min.bucketinteger1\([1, \infty)\)min.node.sizeintegerNULL\([1, \infty)\)minpropnumeric0.1\((-\infty, \infty)\)mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacterignoreignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-se.methodcharacterinfjackjack, infjack-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- +IdTypeDefaultLevelsRangealways.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([1, \infty)\)min.bucketuntyped1L-min.node.sizeuntypedNULL-mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)na.actioncharacterna.learnna.learn, na.omit, na.fail-num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacter-ignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- References Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@ Public methodsLearnerClassifRanger$oob_error() LearnerClassifRanger$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
mlr3::Learner$base_learner()
mlr3::Learner$encapsulate()
mlr3::Learner$format()
mlr3::Learner$help()
mlr3::Learner$predict()
LearnerClassifMultinom$loglik()
LearnerClassifMultinom$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -197,7 +198,7 @@ Examples#> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor -#> * Properties: loglik, multiclass, twoclass, weights +#> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 diff --git a/reference/mlr_learners_classif.naive_bayes.html b/reference/mlr_learners_classif.naive_bayes.html index bcbe8eb2..41a0a917 100644 --- a/reference/mlr_learners_classif.naive_bayes.html +++ b/reference/mlr_learners_classif.naive_bayes.html @@ -1,5 +1,5 @@ -Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes • mlr3learnersNaive Bayes Classification Learner — mlr_learners_classif.naive_bayes • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -119,6 +119,7 @@ Public methodsLearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.nnet.html b/reference/mlr_learners_classif.nnet.html index 33e887c7..5ef38932 100644 --- a/reference/mlr_learners_classif.nnet.html +++ b/reference/mlr_learners_classif.nnet.html @@ -1,5 +1,5 @@ -Classification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersClassification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -69,7 +69,7 @@ Meta InformationTask type: “classif” Predict Types: “response”, “prob” -Feature Types: “integer”, “numeric”, “factor”, “ordered” +Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet @@ -147,6 +147,7 @@ Public methodsLearnerClassifNnet$new() LearnerClassifNnet$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.qda.html b/reference/mlr_learners_classif.qda.html index 44b905c4..97e41ad7 100644 --- a/reference/mlr_learners_classif.qda.html +++ b/reference/mlr_learners_classif.qda.html @@ -1,5 +1,5 @@ -Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learnersQuadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -133,6 +133,7 @@ Public methodsLearnerClassifQDA$new() LearnerClassifQDA$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.ranger.html b/reference/mlr_learners_classif.ranger.html index 63acfcc0..57a25cb6 100644 --- a/reference/mlr_learners_classif.ranger.html +++ b/reference/mlr_learners_classif.ranger.html @@ -1,5 +1,5 @@ -Ranger Classification Learner — mlr_learners_classif.ranger • mlr3learnersRanger Classification Learner — mlr_learners_classif.ranger • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -62,7 +62,9 @@ Custom mlr3 parametersInitial parameter values -num.threads:Actual default: NULL, triggering auto-detection of the number of CPUs. +num.threads:Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order. Adjusted value: 1. Reason for change: Conflicting with parallelization via future. @@ -87,7 +89,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0.5\((-\infty, \infty)\)always.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([0, \infty)\)min.bucketinteger1\([1, \infty)\)min.node.sizeintegerNULL\([1, \infty)\)minpropnumeric0.1\((-\infty, \infty)\)mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacterignoreignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-se.methodcharacterinfjackjack, infjack-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- +IdTypeDefaultLevelsRangealways.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([1, \infty)\)min.bucketuntyped1L-min.node.sizeuntypedNULL-mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)na.actioncharacterna.learnna.learn, na.omit, na.fail-num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacter-ignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- References Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@ Public methodsLearnerClassifRanger$oob_error() LearnerClassifRanger$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
LearnerClassifNaiveBayes$new()
LearnerClassifNaiveBayes$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.nnet.html b/reference/mlr_learners_classif.nnet.html index 33e887c7..5ef38932 100644 --- a/reference/mlr_learners_classif.nnet.html +++ b/reference/mlr_learners_classif.nnet.html @@ -1,5 +1,5 @@ -Classification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersClassification Neural Network Learner — mlr_learners_classif.nnet • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -69,7 +69,7 @@ Meta InformationTask type: “classif” Predict Types: “response”, “prob” -Feature Types: “integer”, “numeric”, “factor”, “ordered” +Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet @@ -147,6 +147,7 @@ Public methodsLearnerClassifNnet$new() LearnerClassifNnet$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.qda.html b/reference/mlr_learners_classif.qda.html index 44b905c4..97e41ad7 100644 --- a/reference/mlr_learners_classif.qda.html +++ b/reference/mlr_learners_classif.qda.html @@ -1,5 +1,5 @@ -Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learnersQuadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -133,6 +133,7 @@ Public methodsLearnerClassifQDA$new() LearnerClassifQDA$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.ranger.html b/reference/mlr_learners_classif.ranger.html index 63acfcc0..57a25cb6 100644 --- a/reference/mlr_learners_classif.ranger.html +++ b/reference/mlr_learners_classif.ranger.html @@ -1,5 +1,5 @@ -Ranger Classification Learner — mlr_learners_classif.ranger • mlr3learnersRanger Classification Learner — mlr_learners_classif.ranger • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -62,7 +62,9 @@ Custom mlr3 parametersInitial parameter values -num.threads:Actual default: NULL, triggering auto-detection of the number of CPUs. +num.threads:Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order. Adjusted value: 1. Reason for change: Conflicting with parallelization via future. @@ -87,7 +89,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0.5\((-\infty, \infty)\)always.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([0, \infty)\)min.bucketinteger1\([1, \infty)\)min.node.sizeintegerNULL\([1, \infty)\)minpropnumeric0.1\((-\infty, \infty)\)mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacterignoreignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-se.methodcharacterinfjackjack, infjack-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- +IdTypeDefaultLevelsRangealways.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([1, \infty)\)min.bucketuntyped1L-min.node.sizeuntypedNULL-mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)na.actioncharacterna.learnna.learn, na.omit, na.fail-num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacter-ignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- References Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@ Public methodsLearnerClassifRanger$oob_error() LearnerClassifRanger$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
Task type: “classif”
Predict Types: “response”, “prob”
Feature Types: “integer”, “numeric”, “factor”, “ordered”
Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”
Required Packages: mlr3, mlr3learners, nnet
LearnerClassifNnet$new()
LearnerClassifNnet$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.qda.html b/reference/mlr_learners_classif.qda.html index 44b905c4..97e41ad7 100644 --- a/reference/mlr_learners_classif.qda.html +++ b/reference/mlr_learners_classif.qda.html @@ -1,5 +1,5 @@ -Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learnersQuadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -133,6 +133,7 @@ Public methodsLearnerClassifQDA$new() LearnerClassifQDA$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.ranger.html b/reference/mlr_learners_classif.ranger.html index 63acfcc0..57a25cb6 100644 --- a/reference/mlr_learners_classif.ranger.html +++ b/reference/mlr_learners_classif.ranger.html @@ -1,5 +1,5 @@ -Ranger Classification Learner — mlr_learners_classif.ranger • mlr3learnersRanger Classification Learner — mlr_learners_classif.ranger • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -62,7 +62,9 @@ Custom mlr3 parametersInitial parameter values -num.threads:Actual default: NULL, triggering auto-detection of the number of CPUs. +num.threads:Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order. Adjusted value: 1. Reason for change: Conflicting with parallelization via future. @@ -87,7 +89,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0.5\((-\infty, \infty)\)always.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([0, \infty)\)min.bucketinteger1\([1, \infty)\)min.node.sizeintegerNULL\([1, \infty)\)minpropnumeric0.1\((-\infty, \infty)\)mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacterignoreignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-se.methodcharacterinfjackjack, infjack-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- +IdTypeDefaultLevelsRangealways.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([1, \infty)\)min.bucketuntyped1L-min.node.sizeuntypedNULL-mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)na.actioncharacterna.learnna.learn, na.omit, na.fail-num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacter-ignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- References Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@ Public methodsLearnerClassifRanger$oob_error() LearnerClassifRanger$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
LearnerClassifQDA$new()
LearnerClassifQDA$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.ranger.html b/reference/mlr_learners_classif.ranger.html index 63acfcc0..57a25cb6 100644 --- a/reference/mlr_learners_classif.ranger.html +++ b/reference/mlr_learners_classif.ranger.html @@ -1,5 +1,5 @@ -Ranger Classification Learner — mlr_learners_classif.ranger • mlr3learnersRanger Classification Learner — mlr_learners_classif.ranger • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -62,7 +62,9 @@ Custom mlr3 parametersInitial parameter values -num.threads:Actual default: NULL, triggering auto-detection of the number of CPUs. +num.threads:Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order. Adjusted value: 1. Reason for change: Conflicting with parallelization via future. @@ -87,7 +89,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0.5\((-\infty, \infty)\)always.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([0, \infty)\)min.bucketinteger1\([1, \infty)\)min.node.sizeintegerNULL\([1, \infty)\)minpropnumeric0.1\((-\infty, \infty)\)mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacterignoreignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-se.methodcharacterinfjackjack, infjack-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- +IdTypeDefaultLevelsRangealways.split.variablesuntyped--class.weightsuntypedNULL-holdoutlogicalFALSETRUE, FALSE-importancecharacter-none, impurity, impurity_corrected, permutation-keep.inbaglogicalFALSETRUE, FALSE-max.depthintegerNULL\([1, \infty)\)min.bucketuntyped1L-min.node.sizeuntypedNULL-mtryinteger-\([1, \infty)\)mtry.rationumeric-\([0, 1]\)na.actioncharacterna.learnna.learn, na.omit, na.fail-num.random.splitsinteger1\([1, \infty)\)node.statslogicalFALSETRUE, FALSE-num.threadsinteger1\([1, \infty)\)num.treesinteger500\([1, \infty)\)oob.errorlogicalTRUETRUE, FALSE-regularization.factoruntyped1-regularization.usedepthlogicalFALSETRUE, FALSE-replacelogicalTRUETRUE, FALSE-respect.unordered.factorscharacter-ignore, order, partition-sample.fractionnumeric-\([0, 1]\)save.memorylogicalFALSETRUE, FALSE-scale.permutation.importancelogicalFALSETRUE, FALSE-seedintegerNULL\((-\infty, \infty)\)split.select.weightsuntypedNULL-splitrulecharacterginigini, extratrees, hellinger-verboselogicalTRUETRUE, FALSE-write.forestlogicalTRUETRUE, FALSE- References Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@ Public methodsLearnerClassifRanger$oob_error() LearnerClassifRanger$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
num.threads:
num.threads
Actual default: NULL, triggering auto-detection of the number of CPUs.
NULL
Actual default: 2, using two threads, while also respecting environment variable +R_RANGER_NUM_THREADS, options(ranger.num.threads = N), or options(Ncpus = N), with +precedence in that order.
2
R_RANGER_NUM_THREADS
options(ranger.num.threads = N)
options(Ncpus = N)
Adjusted value: 1.
Reason for change: Conflicting with parallelization via future.
Wright, N. M, Ziegler, Andreas (2017). @@ -152,6 +154,7 @@
LearnerClassifRanger$oob_error()
LearnerClassifRanger$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() @@ -247,8 +250,8 @@ Examples#> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered -#> * Properties: hotstart_backward, importance, multiclass, oob_error, -#> twoclass, weights +#> * Properties: hotstart_backward, importance, missings, multiclass, +#> oob_error, twoclass, weights #> Ranger result #> #> Call: @@ -266,7 +269,7 @@ Examples#> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) -#> <environment: 0x555e22707568> +#> <environment: 0x55f8e0941938> #> classif.ce #> 0.173913 diff --git a/reference/mlr_learners_classif.svm.html b/reference/mlr_learners_classif.svm.html index fe596d30..883bbf59 100644 --- a/reference/mlr_learners_classif.svm.html +++ b/reference/mlr_learners_classif.svm.html @@ -1,5 +1,5 @@ -Support Vector Machine — mlr_learners_classif.svm • mlr3learnersSupport Vector Machine — mlr_learners_classif.svm • mlr3learners Skip to contents @@ -9,7 +9,7 @@ mlr3learners - 0.8.0 + 0.9.0 @@ -127,6 +127,7 @@ Public methodsLearnerClassifSVM$new() LearnerClassifSVM$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
LearnerClassifSVM$new()
LearnerClassifSVM$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_classif.xgboost.html b/reference/mlr_learners_classif.xgboost.html index 1d9720fc..f21175d4 100644 --- a/reference/mlr_learners_classif.xgboost.html +++ b/reference/mlr_learners_classif.xgboost.html @@ -1,5 +1,5 @@ -Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost • mlr3learnersmlr3learners - 0.8.0 + 0.9.0 @@ -122,7 +122,7 @@ Meta Information Parameters -IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- +IdTypeDefaultLevelsRangealphanumeric0\([0, \infty)\)approxcontriblogicalFALSETRUE, FALSE-base_scorenumeric0.5\((-\infty, \infty)\)base_marginuntypedNULL-boostercharactergbtreegbtree, gblinear, dart-callbacksuntypedlist()-colsample_bylevelnumeric1\([0, 1]\)colsample_bynodenumeric1\([0, 1]\)colsample_bytreenumeric1\([0, 1]\)deviceuntyped"cpu"-disable_default_eval_metriclogicalFALSETRUE, FALSE-early_stopping_roundsintegerNULL\([1, \infty)\)etanumeric0.3\([0, 1]\)eval_metricuntyped--feature_selectorcharactercycliccyclic, shuffle, random, greedy, thrifty-gammanumeric0\([0, \infty)\)grow_policycharacterdepthwisedepthwise, lossguide-interaction_constraintsuntyped--iterationrangeuntyped--lambdanumeric1\([0, \infty)\)lambda_biasnumeric0\([0, \infty)\)max_bininteger256\([2, \infty)\)max_delta_stepnumeric0\([0, \infty)\)max_depthinteger6\([0, \infty)\)max_leavesinteger0\([0, \infty)\)maximizelogicalNULLTRUE, FALSE-min_child_weightnumeric1\([0, \infty)\)missingnumericNA\((-\infty, \infty)\)monotone_constraintsuntyped0-nroundsinteger-\([1, \infty)\)normalize_typecharactertreetree, forest-nthreadinteger1\([1, \infty)\)ntreelimitintegerNULL\([1, \infty)\)num_parallel_treeinteger1\([1, \infty)\)objectiveuntyped"binary:logistic"-one_droplogicalFALSETRUE, FALSE-outputmarginlogicalFALSETRUE, FALSE-predcontriblogicalFALSETRUE, FALSE-predinteractionlogicalFALSETRUE, FALSE-predleaflogicalFALSETRUE, FALSE-print_every_ninteger1\([1, \infty)\)process_typecharacterdefaultdefault, update-rate_dropnumeric0\([0, 1]\)refresh_leaflogicalTRUETRUE, FALSE-reshapelogicalFALSETRUE, FALSE-seed_per_iterationlogicalFALSETRUE, FALSE-sampling_methodcharacteruniformuniform, gradient_based-sample_typecharacteruniformuniform, weighted-save_nameuntypedNULL-save_periodintegerNULL\([0, \infty)\)scale_pos_weightnumeric1\((-\infty, \infty)\)skip_dropnumeric0\([0, 1]\)strict_shapelogicalFALSETRUE, FALSE-subsamplenumeric1\([0, 1]\)top_kinteger0\([0, \infty)\)traininglogicalFALSETRUE, FALSE-tree_methodcharacterautoauto, exact, approx, hist, gpu_hist-tweedie_variance_powernumeric1.5\([1, 2]\)updateruntyped--verboseinteger1\([0, 2]\)watchlistuntypedNULL-xgb_modeluntypedNULL- References Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@ Public methodsLearnerClassifXgboost$importance() LearnerClassifXgboost$clone() Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]
Chen, Tianqi, Guestrin, Carlos (2016). @@ -205,6 +205,7 @@
LearnerClassifXgboost$importance()
LearnerClassifXgboost$clone()
Inherited methodsmlr3::Learner$base_learner() +mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() diff --git a/reference/mlr_learners_regr.cv_glmnet.html b/reference/mlr_learners_regr.cv_glmnet.html index 1a7bf3c6..e0edf73f 100644 --- a/reference/mlr_learners_regr.cv_glmnet.html +++ b/reference/mlr_learners_regr.cv_glmnet.html @@ -1,5 +1,5 @@ -GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet • mlr3learnersGLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet • mlr3learnersKriging Regression Learner — mlr_learners_regr.km • mlr3learners mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: loglik, twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: loglik, multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, multiclass, oob_error, #> twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: loglik, weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: NULL, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, oob_error, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}] +[{"path":"https://mlr3learners.mlr-org.com/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Michel Lang. Author. Quay Au. Author. Stefan Coors. Author. Patrick Schratz. Author. Marc Becker. Maintainer, author.","code":""},{"path":"https://mlr3learners.mlr-org.com/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lang M, Au Q, Coors S, Schratz P, Becker M (2024). mlr3learners: Recommended Learners 'mlr3'. R package version 0.9.0, https://github.com/mlr-org/mlr3learners, https://mlr3learners.mlr-org.com.","code":"@Manual{, title = {mlr3learners: Recommended Learners for 'mlr3'}, author = {Michel Lang and Quay Au and Stefan Coors and Patrick Schratz and Marc Becker}, year = {2024}, note = {R package version 0.9.0, https://github.com/mlr-org/mlr3learners}, url = {https://mlr3learners.mlr-org.com}, }"},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"mlr3learners","dir":"","previous_headings":"","what":"Recommended Learners for mlr3","title":"Recommended Learners for mlr3","text":"Package website: release | dev packages provides essential learners mlr3, maintained mlr-org team. Additional learners can found mlr3extralearners package GitHub. Request additional learners . 👉 Table learners","code":""},{"path":"https://mlr3learners.mlr-org.com/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Recommended Learners for mlr3","text":"also want install packages connected learners, set dependencies = TRUE:","code":"# CRAN version: install.packages(\"mlr3learners\") # Development version: remotes::install_github(\"mlr-org/mlr3learners\") # CRAN version: install.packages(\"mlr3learners\", dependencies = TRUE) # Development version: remotes::install_github(\"mlr-org/mlr3learners\", dependencies = TRUE)"},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":null,"dir":"Reference","previous_headings":"","what":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"learners implemented mlr3extralearners package. guide create custom learners covered book: https://mlr3book.mlr-org.com. Feel invited contribute missing learner mlr3 ecosystem!","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr3learners-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"mlr3learners: Recommended Learners for 'mlr3' — mlr3learners-package","text":"Maintainer: Marc Becker marcbecker@posteo.de (ORCID) Authors: Michel Lang michellang@gmail.com (ORCID) Quay Au quayau@gmail.com (ORCID) Stefan Coors mail@stefancoors.de (ORCID) Patrick Schratz patrick.schratz@gmail.com (ORCID)","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"binomial\" \"multinomial\", depending number classes.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.cv_glmnet\") lrn(\"classif.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"LearnerClassifCVGlmnet$new() LearnerClassifCVGlmnet$selected_features() LearnerClassifCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"LearnerClassifCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.cv_glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, selected_features, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Measure: Binomial Deviance #> #> Lambda Index Measure SE Nonzero #> min 0.03602 22 0.9852 0.09482 15 #> 1se 0.08322 13 1.0594 0.05488 6 #> classif.ce #> 0.2753623"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.glmnet\") lrn(\"classif.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"LearnerClassifGlmnet$new() LearnerClassifGlmnet$selected_features() LearnerClassifGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"LearnerClassifGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Classification Learner — mlr_learners_classif.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.glmnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass, weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"binomial\") #> #> Df %Dev Lambda #> 1 0 0.00 0.220000 #> 2 2 2.84 0.200500 #> 3 2 6.12 0.182700 #> 4 2 8.92 0.166400 #> 5 2 11.34 0.151700 #> 6 3 13.57 0.138200 #> 7 4 16.23 0.125900 #> 8 4 18.66 0.114700 #> 9 4 20.79 0.104500 #> 10 6 22.87 0.095250 #> 11 7 24.99 0.086780 #> 12 8 27.05 0.079080 #> 13 8 28.98 0.072050 #> 14 8 30.71 0.065650 #> 15 9 32.81 0.059820 #> 16 9 34.73 0.054500 #> 17 9 36.45 0.049660 #> 18 11 38.18 0.045250 #> 19 13 40.12 0.041230 #> 20 13 41.90 0.037570 #> 21 15 43.69 0.034230 #> 22 15 45.40 0.031190 #> 23 16 46.95 0.028420 #> 24 18 48.54 0.025890 #> 25 20 50.10 0.023590 #> 26 21 51.66 0.021500 #> 27 21 53.09 0.019590 #> 28 22 54.50 0.017850 #> 29 23 55.88 0.016260 #> 30 24 57.15 0.014820 #> 31 26 58.42 0.013500 #> 32 25 59.69 0.012300 #> 33 28 60.88 0.011210 #> 34 31 62.42 0.010210 #> 35 31 64.03 0.009306 #> 36 32 65.54 0.008479 #> 37 33 67.00 0.007726 #> 38 36 68.46 0.007039 #> 39 38 70.09 0.006414 #> 40 39 71.65 0.005844 #> 41 40 73.21 0.005325 #> 42 39 74.71 0.004852 #> 43 40 76.07 0.004421 #> 44 41 77.39 0.004028 #> 45 42 78.67 0.003670 #> 46 42 80.06 0.003344 #> 47 40 81.23 0.003047 #> 48 43 82.42 0.002776 #> 49 43 83.59 0.002530 #> 50 43 84.74 0.002305 #> 51 46 85.87 0.002100 #> 52 46 86.99 0.001914 #> 53 47 88.05 0.001744 #> 54 47 89.05 0.001589 #> 55 48 90.00 0.001448 #> 56 48 90.87 0.001319 #> 57 48 91.68 0.001202 #> 58 48 92.42 0.001095 #> 59 48 93.10 0.000998 #> 60 48 93.72 0.000909 #> 61 48 94.28 0.000828 #> 62 47 94.79 0.000755 #> 63 47 95.25 0.000688 #> 64 47 95.67 0.000627 #> 65 47 96.05 0.000571 #> 66 47 96.40 0.000520 #> 67 47 96.71 0.000474 #> 68 47 97.00 0.000432 #> 69 47 97.27 0.000394 #> 70 48 97.51 0.000359 #> 71 48 97.73 0.000327 #> 72 48 97.93 0.000298 #> 73 48 98.11 0.000271 #> 74 48 98.28 0.000247 #> 75 48 98.43 0.000225 #> 76 48 98.57 0.000205 #> 77 48 98.69 0.000187 #> 78 48 98.81 0.000170 #> 79 48 98.91 0.000155 #> 80 48 99.01 0.000141 #> 81 48 99.10 0.000129 #> 82 48 99.17 0.000117 #> 83 48 99.25 0.000107 #> 84 48 99.31 0.000097 #> 85 48 99.37 0.000089 #> 86 48 99.43 0.000081 #> 87 48 99.48 0.000074 #> 88 48 99.52 0.000067 #> 89 48 99.57 0.000061 #> 90 48 99.60 0.000056 #> 91 48 99.64 0.000051 #> 92 48 99.67 0.000046 #> 93 48 99.70 0.000042 #> 94 48 99.72 0.000038 #> 95 48 99.75 0.000035 #> 96 48 99.77 0.000032 #> 97 49 99.79 0.000029 #> 98 49 99.81 0.000027 #> 99 49 99.82 0.000024 #> 100 49 99.84 0.000022 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"k-Nearest-Neighbor classification. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.kknn\") lrn(\"classif.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"LearnerClassifKKNN$new() LearnerClassifKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"LearnerClassifKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Classification Learner — mlr_learners_classif.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.kknn\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass #> $formula #> Class ~ . #> NULL #> #> $data #> Class V1 V10 V11 V12 V13 V14 V15 V16 V17 #> #> 1: R 0.0200 0.2111 0.1609 0.1582 0.2238 0.0645 0.0660 0.2273 0.3100 #> 2: R 0.0453 0.2872 0.4918 0.6552 0.6919 0.7797 0.7464 0.9444 1.0000 #> 3: R 0.0762 0.4459 0.4152 0.3952 0.4256 0.4135 0.4528 0.5326 0.7306 #> 4: R 0.0317 0.3513 0.1786 0.0658 0.0513 0.3752 0.5419 0.5440 0.5150 #> 5: R 0.0164 0.0251 0.0801 0.1056 0.1266 0.0890 0.0198 0.1133 0.2826 #> --- #> 135: M 0.0272 0.3997 0.3941 0.3309 0.2926 0.1760 0.1739 0.2043 0.2088 #> 136: M 0.0323 0.2154 0.3085 0.3425 0.2990 0.1402 0.1235 0.1534 0.1901 #> 137: M 0.0522 0.2529 0.2716 0.2374 0.1878 0.0983 0.0683 0.1503 0.1723 #> 138: M 0.0303 0.2354 0.2898 0.2812 0.1578 0.0273 0.0673 0.1444 0.2070 #> 139: M 0.0260 0.2354 0.2720 0.2442 0.1665 0.0336 0.1302 0.1708 0.2177 #> V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 #> #> 1: 0.2999 0.5078 0.0371 0.4797 0.5783 0.5071 0.4328 0.5550 0.6711 0.6415 #> 2: 0.8874 0.8024 0.0523 0.7818 0.5212 0.4052 0.3957 0.3914 0.3250 0.3200 #> 3: 0.6193 0.2032 0.0666 0.4636 0.4148 0.4292 0.5730 0.5399 0.3161 0.2285 #> 4: 0.4262 0.2024 0.0956 0.4233 0.7723 0.9735 0.9390 0.5559 0.5268 0.6826 #> 5: 0.3234 0.3238 0.0173 0.4333 0.6068 0.7652 0.9203 0.9719 0.9207 0.7545 #> --- #> 135: 0.2678 0.2434 0.0378 0.1839 0.2802 0.6172 0.8015 0.8313 0.8440 0.8494 #> 136: 0.2429 0.2120 0.0101 0.2395 0.3272 0.5949 0.8302 0.9045 0.9888 0.9912 #> 137: 0.2339 0.1962 0.0437 0.1395 0.3164 0.5888 0.7631 0.8473 0.9424 0.9986 #> 138: 0.2645 0.2828 0.0353 0.4293 0.5685 0.6990 0.7246 0.7622 0.9242 1.0000 #> 139: 0.3175 0.3714 0.0363 0.4552 0.5700 0.7397 0.8062 0.8837 0.9432 1.0000 #> V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 #> #> 1: 0.7104 0.8080 0.6791 0.0428 0.3857 0.1307 0.2604 0.5121 0.7547 0.8537 #> 2: 0.3271 0.2767 0.4423 0.0843 0.2028 0.3788 0.2947 0.1984 0.2341 0.1306 #> 3: 0.6995 1.0000 0.7262 0.0481 0.4724 0.5103 0.5459 0.2881 0.0981 0.1951 #> 4: 0.5713 0.5429 0.2177 0.1321 0.2149 0.5811 0.6323 0.2965 0.1873 0.2969 #> 5: 0.8289 0.8907 0.7309 0.0347 0.6896 0.5829 0.4935 0.3101 0.0306 0.0244 #> --- #> 135: 0.9168 1.0000 0.7896 0.0488 0.5371 0.6472 0.6505 0.4959 0.2175 0.0990 #> 136: 0.9448 1.0000 0.9092 0.0298 0.7412 0.7691 0.7117 0.5304 0.2131 0.0928 #> 137: 0.9699 1.0000 0.8630 0.0180 0.6979 0.7717 0.7305 0.5197 0.1786 0.1098 #> 138: 0.9979 0.8297 0.7032 0.0490 0.7141 0.6893 0.4961 0.2584 0.0969 0.0776 #> 139: 0.9375 0.7603 0.7123 0.0136 0.8358 0.7622 0.4567 0.1715 0.1549 0.1641 #> V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 #> #> 1: 0.8507 0.6692 0.6097 0.4943 0.0207 0.2744 0.0510 0.2834 0.2825 0.4256 #> 2: 0.4182 0.3835 0.1057 0.1840 0.0689 0.1970 0.1674 0.0583 0.1401 0.1628 #> 3: 0.4181 0.4604 0.3217 0.2828 0.0394 0.2430 0.1979 0.2444 0.1847 0.0841 #> 4: 0.5163 0.6153 0.4283 0.5479 0.1408 0.6133 0.5017 0.2377 0.1957 0.1749 #> 5: 0.1108 0.1594 0.1371 0.0696 0.0070 0.0452 0.0620 0.1421 0.1597 0.1384 #> --- #> 135: 0.0434 0.1708 0.1979 0.1880 0.0848 0.1108 0.1702 0.0585 0.0638 0.1391 #> 136: 0.1297 0.1159 0.1226 0.1768 0.0564 0.0345 0.1562 0.0824 0.1149 0.1694 #> 137: 0.1446 0.1066 0.1440 0.1929 0.0292 0.0325 0.1490 0.0328 0.0537 0.1309 #> 138: 0.0364 0.1572 0.1823 0.1349 0.0608 0.0849 0.0492 0.1367 0.1552 0.1548 #> 139: 0.1869 0.2655 0.1713 0.0959 0.0272 0.0768 0.0847 0.2076 0.2505 0.1862 #> V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 #> #> 1: 0.2641 0.1386 0.1051 0.1343 0.0383 0.0954 0.0324 0.0232 0.0027 0.0065 #> 2: 0.0621 0.0203 0.0530 0.0742 0.0409 0.1183 0.0061 0.0125 0.0084 0.0089 #> 3: 0.0692 0.0528 0.0357 0.0085 0.0230 0.0590 0.0046 0.0156 0.0031 0.0054 #> 4: 0.1304 0.0597 0.1124 0.1047 0.0507 0.1674 0.0159 0.0195 0.0201 0.0248 #> 5: 0.0372 0.0688 0.0867 0.0513 0.0092 0.0187 0.0198 0.0118 0.0090 0.0223 #> --- #> 135: 0.0638 0.0581 0.0641 0.1044 0.0732 0.1127 0.0275 0.0146 0.0091 0.0045 #> 136: 0.0954 0.0080 0.0790 0.1255 0.0647 0.0760 0.0179 0.0051 0.0061 0.0093 #> 137: 0.0910 0.0757 0.1059 0.1005 0.0535 0.0351 0.0235 0.0155 0.0160 0.0029 #> 138: 0.1319 0.0985 0.1258 0.0954 0.0489 0.0167 0.0241 0.0042 0.0086 0.0046 #> 139: 0.1439 0.1470 0.0991 0.0041 0.0154 0.0214 0.0116 0.0181 0.0146 0.0129 #> V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 #> #> 1: 0.0159 0.0072 0.0167 0.0180 0.0084 0.0090 0.0986 0.0032 0.1539 0.1601 #> 2: 0.0048 0.0094 0.0191 0.0140 0.0049 0.0052 0.2583 0.0044 0.2156 0.3481 #> 3: 0.0105 0.0110 0.0015 0.0072 0.0048 0.0107 0.0649 0.0094 0.1209 0.2467 #> 4: 0.0131 0.0070 0.0138 0.0092 0.0143 0.0036 0.1710 0.0103 0.0731 0.1401 #> 5: 0.0179 0.0084 0.0068 0.0032 0.0035 0.0056 0.0671 0.0040 0.1056 0.0697 #> --- #> 135: 0.0043 0.0043 0.0098 0.0054 0.0051 0.0065 0.1103 0.0103 0.1349 0.2337 #> 136: 0.0135 0.0063 0.0063 0.0034 0.0032 0.0062 0.0958 0.0067 0.0990 0.1018 #> 137: 0.0051 0.0062 0.0089 0.0140 0.0138 0.0077 0.1171 0.0031 0.1257 0.1178 #> 138: 0.0126 0.0036 0.0035 0.0034 0.0079 0.0036 0.1354 0.0048 0.1465 0.1123 #> 139: 0.0047 0.0039 0.0061 0.0040 0.0036 0.0061 0.0338 0.0115 0.0655 0.1400 #> V9 #> #> 1: 0.3109 #> 2: 0.3337 #> 3: 0.3564 #> 4: 0.2083 #> 5: 0.0962 #> --- #> 135: 0.3113 #> 136: 0.1030 #> 137: 0.1258 #> 138: 0.1945 #> 139: 0.1843 #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Linear discriminant analysis. Calls MASS::lda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.lda\") lrn(\"classif.lda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"LearnerClassifLDA$new() LearnerClassifLDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"LearnerClassifLDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.lda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Discriminant Analysis Classification Learner — mlr_learners_classif.lda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.lda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> lda(formula, data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5683453 0.4316547 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03387089 0.2486405 0.2880025 0.3046646 0.3143266 0.3174886 0.3314139 #> R 0.02065167 0.1648700 0.1721000 0.1821167 0.2243267 0.2694383 0.3158467 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3748975 0.4073241 0.4465785 0.5287114 0.04548354 0.6104582 0.661338 #> R 0.3869433 0.4177817 0.4338317 0.4461183 0.02706833 0.4904283 0.535965 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6721506 0.6796076 0.6860405 0.6726772 0.6929759 0.7067924 0.7055861 #> R 0.5579800 0.6087700 0.6588733 0.6833000 0.7198517 0.7283800 0.7105317 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6483861 0.05192152 0.5793152 0.4838316 0.4265329 0.3948797 0.3683468 #> R 0.6364433 0.03492667 0.5693350 0.5229700 0.4431833 0.4200067 0.4202883 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3358608 0.3231620 0.3276228 0.3381759 0.3392000 0.06547595 0.3089684 #> R 0.4294083 0.4437883 0.4022517 0.3317000 0.3111667 0.04111333 0.3048633 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2939873 0.3012519 0.27480 0.2480342 0.2474772 0.1998646 0.14533797 #> R 0.2680083 0.2279450 0.20125 0.1569350 0.1258133 0.1014250 0.08515167 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.11052278 0.06424177 0.08434937 0.02154051 0.01876076 0.01663797 0.011339241 #> R 0.06455667 0.03679833 0.06127500 0.01776500 0.01260667 0.01087167 0.009756667 #> V54 V55 V56 V57 V58 V59 #> M 0.011962025 0.009921519 0.008825316 0.007694937 0.008582278 0.008159494 #> R 0.009526667 0.008200000 0.007326667 0.008295000 0.006646667 0.007186667 #> V6 V60 V7 V8 V9 #> M 0.1105354 0.006540506 0.1204152 0.1432835 0.2111861 #> R 0.1023283 0.005896667 0.1169283 0.1232300 0.1442900 #> #> Coefficients of linear discriminants: #> LD1 #> V1 -8.890268985 #> V10 7.190173153 #> V11 -3.005999765 #> V12 -7.159285118 #> V13 -1.282358245 #> V14 -0.594399772 #> V15 -2.257851991 #> V16 1.643638951 #> V17 2.569629806 #> V18 -2.448963129 #> V19 -0.809302980 #> V2 -18.853474750 #> V20 1.068533111 #> V21 1.340858876 #> V22 0.008558469 #> V23 -0.644421437 #> V24 -4.738474369 #> V25 4.526107822 #> V26 -2.823098170 #> V27 2.536264503 #> V28 -1.488666624 #> V29 4.496251278 #> V3 18.839238037 #> V30 -9.378375784 #> V31 11.144500732 #> V32 -6.527262030 #> V33 1.126100349 #> V34 3.859403756 #> V35 -7.051394494 #> V36 7.081602914 #> V37 -0.150712186 #> V38 -0.702596705 #> V39 -5.004491795 #> V4 -10.803815415 #> V40 3.370774488 #> V41 -0.542808084 #> V42 -1.762399889 #> V43 5.772708966 #> V44 -7.576229914 #> V45 5.114554893 #> V46 -5.285887867 #> V47 4.375428979 #> V48 -13.774717313 #> V49 -14.951411997 #> V5 0.887670304 #> V50 27.613540005 #> V51 25.103058295 #> V52 -10.117630506 #> V53 25.876306471 #> V54 -48.992273961 #> V55 103.928819675 #> V56 23.432994415 #> V57 53.954079972 #> V58 -64.118064165 #> V59 -14.470917063 #> V6 -3.069784470 #> V60 71.067229702 #> V7 13.120029903 #> V8 0.819077708 #> V9 -4.212207660 #> classif.ce #> 0.3333333"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Classification via logistic regression. Calls stats::glm() family set \"binomial\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"internal-encoding","dir":"Reference","previous_headings":"","what":"Internal Encoding","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Starting mlr3 v0.5.0, order class labels reversed prior model fitting comply stats::glm() convention negative class provided first factor level.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"model: Actual default: TRUE. Adjusted default: FALSE. Reason change: Save memory.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.log_reg\") lrn(\"classif.log_reg\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogReg","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"LearnerClassifLogReg$new() LearnerClassifLogReg$loglik() LearnerClassifLogReg$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"LearnerClassifLogReg$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.log_reg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic Regression Classification Learner — mlr_learners_classif.log_reg","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.log_reg\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Logistic Regression #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: twoclass, weights #> Warning: glm.fit: algorithm did not converge #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> #> Call: stats::glm(formula = task$formula(), family = \"binomial\", data = data, #> model = FALSE) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> -218.269 447.294 -101.657 57.785 238.149 76.659 #> V14 V15 V16 V17 V18 V19 #> -147.612 73.619 -124.589 10.025 76.102 -20.279 #> V2 V20 V21 V22 V23 V24 #> -17.516 -89.098 136.322 -21.343 -9.840 204.983 #> V25 V26 V27 V28 V29 V3 #> -317.268 279.089 -173.946 168.871 -286.918 -819.898 #> V30 V31 V32 V33 V34 V35 #> 464.489 -403.653 275.932 -227.678 183.149 25.895 #> V36 V37 V38 V39 V4 V40 #> -264.215 67.057 167.517 50.848 173.382 -143.493 #> V41 V42 V43 V44 V45 V46 #> -31.279 -6.487 16.469 260.527 -99.417 -363.118 #> V47 V48 V49 V5 V50 V51 #> 1021.223 -328.349 307.948 428.923 -1749.079 -494.081 #> V52 V53 V54 V55 V56 V57 #> 1741.766 946.441 152.633 -2309.507 -2846.633 -143.526 #> V58 V59 V6 V60 V7 V8 #> 4298.927 1961.737 -190.439 706.957 4.573 323.417 #> V9 #> 10.981 #> #> Degrees of Freedom: 138 Total (i.e. Null); 78 Residual #> Null Deviance:\t 190.1 #> Residual Deviance: 5.789e-09 \tAIC: 122 #> classif.ce #> 0.2898551"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Multinomial log-linear models via neural networks. Calls nnet::multinom() package nnet.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.multinom\") lrn(\"classif.multinom\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifMultinom","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"LearnerClassifMultinom$new() LearnerClassifMultinom$loglik() LearnerClassifMultinom$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"LearnerClassifMultinom$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial log-linear learner via neural networks — mlr_learners_classif.multinom","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.multinom\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Multinomial Log-Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass, weights #> # weights: 62 (61 variable) #> initial value 96.347458 #> iter 10 value 28.060727 #> iter 20 value 1.899489 #> iter 30 value 0.003516 #> final value 0.000058 #> converged #> Call: #> nnet::multinom(formula = Class ~ ., data = task$data()) #> #> Coefficients: #> (Intercept) V1 V10 V11 V12 V13 #> 606.48499 -292.62216 -142.11791 -588.13233 -88.06081 -314.66330 #> V14 V15 V16 V17 V18 V19 #> -134.59359 380.41387 -93.35268 203.69452 83.21463 30.36906 #> V2 V20 V21 V22 V23 V24 #> -208.73362 -213.45852 -335.38329 104.26954 -54.17037 -522.82205 #> V25 V26 V27 V28 V29 V3 #> 700.21783 -201.29489 -279.93755 276.00581 -122.70963 -55.82210 #> V30 V31 V32 V33 V34 V35 #> 39.08240 57.62629 -86.84656 -265.38407 345.24797 -149.54434 #> V36 V37 V38 V39 V4 V40 #> 165.80103 677.99313 -323.04585 -410.21814 -506.70203 468.79101 #> V41 V42 V43 V44 V45 V46 #> -74.72936 -118.46404 -278.18165 -225.21560 -453.56885 -472.40222 #> V47 V48 V49 V5 V50 V51 #> 29.90197 -336.13828 -343.42369 -451.68864 137.03675 -117.66505 #> V52 V53 V54 V55 V56 V57 #> -92.13127 -31.72623 -40.72676 44.68332 46.71611 53.03701 #> V58 V59 V6 V60 V7 V8 #> -34.35565 -51.57852 -168.28882 10.24126 163.11532 640.56455 #> V9 #> -57.59101 #> #> Residual Deviance: 0.0001159859 #> AIC: 122.0001 #> classif.ce #> 0.2463768"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":null,"dir":"Reference","previous_headings":"","what":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Naive Bayes classification. Calls e1071::naiveBayes() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.naive_bayes\") lrn(\"classif.naive_bayes\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNaiveBayes","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"LearnerClassifNaiveBayes$new() LearnerClassifNaiveBayes$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"LearnerClassifNaiveBayes$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.naive_bayes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Naive Bayes Classification Learner — mlr_learners_classif.naive_bayes","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.naive_bayes\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Naive Bayes #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor #> * Properties: multiclass, twoclass #> #> Naive Bayes Classifier for Discrete Predictors #> #> Call: #> naiveBayes.default(x = x, y = y) #> #> A-priori probabilities: #> y #> M R #> 0.5035971 0.4964029 #> #> Conditional probabilities: #> V1 #> y [,1] [,2] #> M 0.03576143 0.02684351 #> R 0.02209565 0.01559364 #> #> V10 #> y [,1] [,2] #> M 0.2726129 0.1421090 #> R 0.1588696 0.1185101 #> #> V11 #> y [,1] [,2] #> M 0.3043686 0.1361172 #> R 0.1724275 0.1171354 #> #> V12 #> y [,1] [,2] #> M 0.3100729 0.1301461 #> R 0.1840812 0.1321283 #> #> V13 #> y [,1] [,2] #> M 0.3244829 0.1396395 #> R 0.2238464 0.1393880 #> #> V14 #> y [,1] [,2] #> M 0.3332643 0.1766075 #> R 0.2611797 0.1673167 #> #> V15 #> y [,1] [,2] #> M 0.3422671 0.2084315 #> R 0.2911377 0.2162335 #> #> V16 #> y [,1] [,2] #> M 0.3821657 0.2314869 #> R 0.3597014 0.2464136 #> #> V17 #> y [,1] [,2] #> M 0.4003786 0.2602862 #> R 0.3879000 0.2829729 #> #> V18 #> y [,1] [,2] #> M 0.4338314 0.2669955 #> R 0.4174826 0.2629652 #> #> V19 #> y [,1] [,2] #> M 0.5156686 0.2657469 #> R 0.4363855 0.2472369 #> #> V2 #> y [,1] [,2] #> M 0.04520857 0.03243771 #> R 0.03037391 0.02639112 #> #> V20 #> y [,1] [,2] #> M 0.5974200 0.2725917 #> R 0.4626855 0.2485295 #> #> V21 #> y [,1] [,2] #> M 0.6437671 0.2733279 #> R 0.4987290 0.2413938 #> #> V22 #> y [,1] [,2] #> M 0.6464457 0.2514303 #> R 0.5333333 0.2673713 #> #> V23 #> y [,1] [,2] #> M 0.6484114 0.2654438 #> R 0.5817986 0.2564723 #> #> V24 #> y [,1] [,2] #> M 0.6641671 0.2584230 #> R 0.6187058 0.2446702 #> #> V25 #> y [,1] [,2] #> M 0.6623857 0.2485371 #> R 0.6287870 0.2645679 #> #> V26 #> y [,1] [,2] #> M 0.7076943 0.2330708 #> R 0.6625348 0.2469941 #> #> V27 #> y [,1] [,2] #> M 0.7195943 0.2597404 #> R 0.6733986 0.2273145 #> #> V28 #> y [,1] [,2] #> M 0.7141914 0.2524030 #> R 0.6753275 0.2076381 #> #> V29 #> y [,1] [,2] #> M 0.6535357 0.2350319 #> R 0.6370029 0.2426187 #> #> V3 #> y [,1] [,2] #> M 0.05095714 0.03566286 #> R 0.03528261 0.03073139 #> #> V30 #> y [,1] [,2] #> M 0.5830171 0.2029212 #> R 0.6036870 0.2251306 #> #> V31 #> y [,1] [,2] #> M 0.4908371 0.2245753 #> R 0.5530855 0.1932639 #> #> V32 #> y [,1] [,2] #> M 0.4405857 0.2229313 #> R 0.4626159 0.2098553 #> #> V33 #> y [,1] [,2] #> M 0.4132214 0.2045360 #> R 0.4520246 0.2101155 #> #> V34 #> y [,1] [,2] #> M 0.3652014 0.2111059 #> R 0.4513464 0.2464201 #> #> V35 #> y [,1] [,2] #> M 0.3269557 0.2453314 #> R 0.4705870 0.2602240 #> #> V36 #> y [,1] [,2] #> M 0.3052214 0.2436184 #> R 0.4893899 0.2529661 #> #> V37 #> y [,1] [,2] #> M 0.3047500 0.2272292 #> R 0.4426101 0.2468271 #> #> V38 #> y [,1] [,2] #> M 0.3258229 0.2036651 #> R 0.3810652 0.2318662 #> #> V39 #> y [,1] [,2] #> M 0.3363629 0.1857309 #> R 0.3444217 0.2273772 #> #> V4 #> y [,1] [,2] #> M 0.06339286 0.03778774 #> R 0.04149855 0.03131444 #> #> V40 #> y [,1] [,2] #> M 0.3010771 0.1652422 #> R 0.3480333 0.2052403 #> #> V41 #> y [,1] [,2] #> M 0.2797414 0.1670650 #> R 0.3106986 0.1877347 #> #> V42 #> y [,1] [,2] #> M 0.2920700 0.1697089 #> R 0.2650203 0.1774334 #> #> V43 #> y [,1] [,2] #> M 0.2768086 0.1482344 #> R 0.2154884 0.1404886 #> #> V44 #> y [,1] [,2] #> M 0.2538214 0.1531734 #> R 0.1726913 0.1145143 #> #> V45 #> y [,1] [,2] #> M 0.2477743 0.1839631 #> R 0.1440551 0.1054603 #> #> V46 #> y [,1] [,2] #> M 0.2031357 0.1604962 #> R 0.1198101 0.1015279 #> #> V47 #> y [,1] [,2] #> M 0.16128429 0.10599481 #> R 0.09678696 0.07508253 #> #> V48 #> y [,1] [,2] #> M 0.1258614 0.07319167 #> R 0.0715913 0.05264197 #> #> V49 #> y [,1] [,2] #> M 0.07143286 0.03871689 #> R 0.03937246 0.03389372 #> #> V5 #> y [,1] [,2] #> M 0.08451143 0.05083893 #> R 0.06198551 0.04737666 #> #> V50 #> y [,1] [,2] #> M 0.02507571 0.01465077 #> R 0.01812464 0.01339883 #> #> V51 #> y [,1] [,2] #> M 0.02130857 0.01533759 #> R 0.01250000 0.00940061 #> #> V52 #> y [,1] [,2] #> M 0.01616714 0.010879668 #> R 0.01099565 0.007860576 #> #> V53 #> y [,1] [,2] #> M 0.011864286 0.007562571 #> R 0.009981159 0.006709306 #> #> V54 #> y [,1] [,2] #> M 0.013040000 0.008841542 #> R 0.009675362 0.005728166 #> #> V55 #> y [,1] [,2] #> M 0.010202857 0.009150750 #> R 0.008584058 0.005399717 #> #> V56 #> y [,1] [,2] #> M 0.009448571 0.006855395 #> R 0.007128986 0.004714748 #> #> V57 #> y [,1] [,2] #> M 0.008214286 0.006693048 #> R 0.007617391 0.005784105 #> #> V58 #> y [,1] [,2] #> M 0.010165714 0.008554055 #> R 0.006963768 0.005151983 #> #> V59 #> y [,1] [,2] #> M 0.009668571 0.007351891 #> R 0.008030435 0.005618177 #> #> V6 #> y [,1] [,2] #> M 0.11148571 0.05276747 #> R 0.09168406 0.06398966 #> #> V60 #> y [,1] [,2] #> M 0.006977143 0.006143930 #> R 0.006447826 0.003817976 #> #> V7 #> y [,1] [,2] #> M 0.1342243 0.06446209 #> R 0.1105913 0.06909169 #> #> V8 #> y [,1] [,2] #> M 0.1565043 0.09010940 #> R 0.1163783 0.08433947 #> #> V9 #> y [,1] [,2] #> M 0.2251914 0.1227192 #> R 0.1316116 0.1031606 #> #> classif.ce #> 0.3913043"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Classification Neural Network Learner — mlr_learners_classif.nnet","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.nnet\") lrn(\"classif.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"LearnerClassifNnet$new() LearnerClassifNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"LearnerClassifNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classification Neural Network Learner — mlr_learners_classif.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.nnet\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: response, [prob] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> # weights: 187 #> initial value 98.709611 #> iter 10 value 51.544891 #> iter 20 value 25.722922 #> iter 30 value 25.198270 #> iter 40 value 24.829482 #> iter 50 value 24.422203 #> iter 60 value 24.409340 #> iter 70 value 21.790075 #> iter 80 value 20.729026 #> iter 90 value 20.151006 #> iter 100 value 20.002287 #> final value 20.002287 #> stopped after 100 iterations #> a 60-3-1 network with 187 weights #> inputs: V1 V10 V11 V12 V13 V14 V15 V16 V17 V18 V19 V2 V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V3 V30 V31 V32 V33 V34 V35 V36 V37 V38 V39 V4 V40 V41 V42 V43 V44 V45 V46 V47 V48 V49 V5 V50 V51 V52 V53 V54 V55 V56 V57 V58 V59 V6 V60 V7 V8 V9 #> output(s): Class #> options were - entropy fitting #> classif.ce #> 0.1449275"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":null,"dir":"Reference","previous_headings":"","what":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Quadratic discriminant analysis. Calls MASS::qda() package MASS.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Parameters method prior exist training prediction accept different values . Therefore, arguments predict stage renamed predict.method predict.prior, respectively.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.qda\") lrn(\"classif.qda\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, MASS","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Venables WN, Ripley BD (2002). Modern Applied Statistics S, Fourth edition. Springer, New York. ISBN 0-387-95457-0, http://www.stats.ox.ac.uk/pub/MASS4/.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifQDA","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"LearnerClassifQDA$new() LearnerClassifQDA$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"LearnerClassifQDA$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.qda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quadratic Discriminant Analysis Classification Learner — mlr_learners_classif.qda","text":"","code":"if (requireNamespace(\"MASS\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.qda\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Quadratic Discriminant Analysis #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, MASS #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: multiclass, twoclass, weights #> Call: #> qda(task$formula(), data = task$data()) #> #> Prior probabilities of groups: #> M R #> 0.5467626 0.4532374 #> #> Group means: #> V1 V10 V11 V12 V13 V14 V15 #> M 0.03695789 0.2530645 0.2926500 0.2950513 0.3143513 0.3260289 0.3438368 #> R 0.02142857 0.1508635 0.1662968 0.1801683 0.2220095 0.2510492 0.2852016 #> V16 V17 V18 V19 V2 V20 V21 #> M 0.3880829 0.4216592 0.4541868 0.5251434 0.04836053 0.6101474 0.6707592 #> R 0.3511127 0.3870873 0.4263571 0.4429921 0.02782857 0.4890063 0.5484762 #> V22 V23 V24 V25 V26 V27 V28 #> M 0.6607947 0.6540829 0.6697421 0.6653105 0.6938342 0.6941026 0.7033684 #> R 0.5660730 0.6081571 0.6668333 0.6860429 0.7030937 0.7018079 0.6975873 #> V29 V3 V30 V31 V32 V33 V34 #> M 0.6515776 0.05545526 0.5902329 0.4798132 0.4287382 0.3997329 0.3712829 #> R 0.6587063 0.03294603 0.5855429 0.5102556 0.4251968 0.4389365 0.4470968 #> V35 V36 V37 V38 V39 V4 V40 #> M 0.3550553 0.3400329 0.3254553 0.3410303 0.3417224 0.07388158 0.3035711 #> R 0.4568794 0.4538587 0.3979254 0.3297492 0.2964762 0.04109206 0.3129460 #> V41 V42 V43 V44 V45 V46 V47 #> M 0.2886816 0.2940092 0.2646237 0.2408276 0.2472868 0.1962053 0.1417316 #> R 0.2892429 0.2552270 0.2103667 0.1648810 0.1346921 0.1118000 0.0875000 #> V48 V49 V5 V50 V51 V52 V53 #> M 0.10839079 0.06232237 0.09072763 0.02162895 0.02020395 0.01690921 0.012292105 #> R 0.06727619 0.03707778 0.06094127 0.01745238 0.01138254 0.00967619 0.009249206 #> V54 V55 V56 V57 V58 V59 #> M 0.01222368 0.010247368 0.009053947 0.008336842 0.009419737 0.009213158 #> R 0.00987619 0.008638095 0.007193651 0.007939683 0.006093651 0.006473016 #> V6 V60 V7 V8 V9 #> M 0.1185855 0.007480263 0.1344053 0.1589842 0.2191711 #> R 0.0971746 0.005744444 0.1140365 0.1131921 0.1324000 #> classif.ce #> 0.4202899"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Classification Learner — mlr_learners_classif.ranger","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Random classification forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.ranger\") lrn(\"classif.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"LearnerClassifRanger$new() LearnerClassifRanger$importance() LearnerClassifRanger$oob_error() LearnerClassifRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"LearnerClassifRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Classification Learner — mlr_learners_classif.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.ranger\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, multiclass, #> oob_error, twoclass, weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), probability = self$predict_type == \"prob\", case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Classification #> Number of trees: 500 #> Sample size: 139 #> Number of independent variables: 60 #> Mtry: 7 #> Target node size: 1 #> Variable importance mode: none #> Splitrule: gini #> OOB prediction error: 19.42 % #> function () #> .__LearnerClassifRanger__importance(self = self, private = private, #> super = super) #> #> classif.ce #> 0.173913"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_classif.svm","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Support vector machine classification. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.svm\") lrn(\"classif.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_classif.svm","text":"LearnerClassifSVM$new() LearnerClassifSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_classif.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"LearnerClassifSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_classif.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_classif.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.svm\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response], prob #> * Feature Types: logical, integer, numeric #> * Properties: multiclass, twoclass #> #> Call: #> svm.default(x = data, y = task$truth(), probability = (self$predict_type == #> \"prob\")) #> #> #> Parameters: #> SVM-Type: C-classification #> SVM-Kernel: radial #> cost: 1 #> #> Number of Support Vectors: 110 #> #> classif.ce #> 0.1304348"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"eXtreme Gradient Boosting classification. Calls xgboost::xgb.train() package xgboost. specified otherwise, evaluation metric set default \"logloss\" binary classification problems set \"mlogloss\" multiclass problems. necessary silence deprecation warning. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"classif.xgboost\") lrn(\"classif.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Task type: “classif” Predict Types: “response”, “prob” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"LearnerClassifXgboost$new() LearnerClassifXgboost$importance() LearnerClassifXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"LearnerClassifXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_classif.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Classification Learner — mlr_learners_classif.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"classif.xgboost\") print(learner) # Define a Task task = tsk(\"sonar\") # Create train and test set ids = partition(task) # Train the learner on the training ids learner$train(task, row_ids = ids$train) # print the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"spam\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"classif.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::cv.glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.cv_glmnet\") lrn(\"regr.cv_glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrCVGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"LearnerRegrCVGlmnet$new() LearnerRegrCVGlmnet$selected_features() LearnerRegrCVGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"LearnerRegrCVGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.cv_glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.cv_glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.cv_glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: selected_features, weights #> Warning: Option grouped=FALSE enforced in cv.glmnet, since < 3 observations per fold #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Measure: Mean-Squared Error #> #> Lambda Index Measure SE Nonzero #> min 0.536 24 7.725 4.015 6 #> 1se 1.797 11 11.052 6.556 4 #> regr.mse #> 19.12881"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Generalized linear models elastic net regularization. Calls glmnet::glmnet() package glmnet. default hyperparameter family set \"gaussian\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Caution: learner different learners calling glmnet::cv.glmnet() use internal optimization parameter lambda. Instead, lambda needs tuned user (e.g., via mlr3tuning). lambda tuned, glmnet trained tuning iteration. fitting whole path lambdas efficient, done default glmnet::glmnet(), tuning/selecting parameter prediction time (using parameter s) currently supported mlr3 (least efficient manner). Tuning s parameter , therefore, currently discouraged. data ..d. efficiency key, recommend using respective auto-tuning counterparts mlr_learners_classif.cv_glmnet() mlr_learners_regr.cv_glmnet(). However, situations applicable, usually data imbalanced ..d. (longitudinal, time-series) tuning requires custom resampling strategies (blocked design, stratification).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.glmnet\") lrn(\"regr.glmnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, glmnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Friedman J, Hastie T, Tibshirani R (2010). “Regularization Paths Generalized Linear Models via Coordinate Descent.” Journal Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrGlmnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"LearnerRegrGlmnet$new() LearnerRegrGlmnet$selected_features() LearnerRegrGlmnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-selected-features-","dir":"Reference","previous_headings":"","what":"Method selected_features()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"Returns set selected features reported glmnet::predict.glmnet() type set \"nonzero\".","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$selected_features(lambda = NULL)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"lambda (numeric(1)) Custom lambda, defaults active lambda depending parameter set.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"(character()) feature names.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"LearnerRegrGlmnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GLM with Elastic Net Regularization Regression Learner — mlr_learners_regr.glmnet","text":"","code":"if (requireNamespace(\"glmnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.glmnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : GLM with Elastic Net Regularization #> * Model: - #> * Parameters: family=gaussian #> * Packages: mlr3, mlr3learners, glmnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: weights #> #> Call: (if (cv) glmnet::cv.glmnet else glmnet::glmnet)(x = data, y = target, family = \"gaussian\") #> #> Df %Dev Lambda #> 1 0 0.00 5.3800 #> 2 1 12.71 4.9020 #> 3 1 23.27 4.4670 #> 4 2 33.34 4.0700 #> 5 2 41.88 3.7080 #> 6 2 48.98 3.3790 #> 7 2 54.86 3.0790 #> 8 2 59.75 2.8050 #> 9 2 63.81 2.5560 #> 10 2 67.18 2.3290 #> 11 2 69.97 2.1220 #> 12 2 72.29 1.9330 #> 13 2 74.22 1.7620 #> 14 2 75.82 1.6050 #> 15 3 77.23 1.4630 #> 16 3 78.48 1.3330 #> 17 3 79.52 1.2140 #> 18 3 80.38 1.1060 #> 19 3 81.10 1.0080 #> 20 3 81.70 0.9185 #> 21 4 82.34 0.8369 #> 22 4 82.95 0.7626 #> 23 4 83.46 0.6948 #> 24 4 83.88 0.6331 #> 25 4 84.22 0.5769 #> 26 4 84.51 0.5256 #> 27 4 84.75 0.4789 #> 28 4 84.95 0.4364 #> 29 4 85.12 0.3976 #> 30 4 85.25 0.3623 #> 31 4 85.37 0.3301 #> 32 5 85.50 0.3008 #> 33 5 85.61 0.2741 #> 34 5 85.70 0.2497 #> 35 5 85.77 0.2275 #> 36 5 85.84 0.2073 #> 37 5 85.89 0.1889 #> 38 5 85.93 0.1721 #> 39 5 85.97 0.1568 #> 40 5 86.00 0.1429 #> 41 6 86.02 0.1302 #> 42 6 86.05 0.1186 #> 43 6 86.07 0.1081 #> 44 6 86.09 0.0985 #> 45 6 86.11 0.0897 #> 46 6 86.12 0.0818 #> 47 8 86.24 0.0745 #> 48 8 86.42 0.0679 #> 49 8 86.56 0.0619 #> 50 8 86.68 0.0564 #> 51 8 86.78 0.0514 #> 52 8 86.86 0.0468 #> 53 8 86.93 0.0426 #> 54 8 86.99 0.0389 #> 55 9 87.04 0.0354 #> 56 9 87.08 0.0322 #> 57 9 87.11 0.0294 #> 58 9 87.14 0.0268 #> 59 9 87.17 0.0244 #> 60 9 87.19 0.0222 #> 61 9 87.20 0.0203 #> 62 9 87.22 0.0185 #> 63 9 87.23 0.0168 #> 64 9 87.24 0.0153 #> 65 9 87.24 0.0140 #> 66 9 87.25 0.0127 #> 67 9 87.25 0.0116 #> 68 10 87.26 0.0106 #> 69 10 87.27 0.0096 #> 70 10 87.27 0.0088 #> 71 10 87.28 0.0080 #> 72 10 87.28 0.0073 #> 73 10 87.28 0.0066 #> 74 10 87.28 0.0060 #> 75 10 87.29 0.0055 #> 76 10 87.29 0.0050 #> Warning: Multiple lambdas have been fit. Lambda will be set to 0.01 (see parameter 's'). #> regr.mse #> 10.7196"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":null,"dir":"Reference","previous_headings":"","what":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"k-Nearest-Neighbor regression. Calls kknn::kknn() package kknn.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"training step k-NN models, just storing training data process predict step. Therefore, $model returns list following elements: formula: Formula calling kknn::kknn() $predict(). data: Training data calling kknn::kknn() $predict(). pv: Training parameters calling kknn::kknn() $predict(). kknn: Model returned kknn::kknn(), available $predict() called. stored default, must set hyperparameter store_model TRUE.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"store_model: See note.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.kknn\") lrn(\"regr.kknn\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, kknn","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Hechenbichler, Klaus, Schliep, Klaus (2004). “Weighted k-nearest-neighbor techniques ordinal classification.” Technical Report Discussion Paper 399, SFB 386, Ludwig-Maximilians University Munich. doi:10.5282/ubm/epub.1769 . Samworth, J R (2012). “Optimal weighted nearest neighbour classifiers.” Annals Statistics, 40(5), 2733–2763. doi:10.1214/12-AOS1049 . Cover, Thomas, Hart, Peter (1967). “Nearest neighbor pattern classification.” IEEE transactions information theory, 13(1), 21–27. doi:10.1109/TIT.1967.1053964 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKKNN","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"LearnerRegrKKNN$new() LearnerRegrKKNN$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"LearnerRegrKKNN$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.kknn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"k-Nearest-Neighbor Regression Learner — mlr_learners_regr.kknn","text":"","code":"if (requireNamespace(\"kknn\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.kknn\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : k-Nearest-Neighbor #> * Model: - #> * Parameters: k=7 #> * Packages: mlr3, mlr3learners, kknn #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: - #> $formula #> mpg ~ . #> NULL #> #> $data #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> 1: 21.0 1 4 6 160.0 3.90 4 110 17.02 0 2.875 #> 2: 22.8 1 1 4 108.0 3.85 4 93 18.61 1 2.320 #> 3: 21.4 0 1 6 258.0 3.08 3 110 19.44 1 3.215 #> 4: 18.7 0 2 8 360.0 3.15 3 175 17.02 0 3.440 #> 5: 18.1 0 1 6 225.0 2.76 3 105 20.22 1 3.460 #> 6: 14.3 0 4 8 360.0 3.21 3 245 15.84 0 3.570 #> 7: 24.4 0 2 4 146.7 3.69 4 62 20.00 1 3.190 #> 8: 22.8 0 2 4 140.8 3.92 4 95 22.90 1 3.150 #> 9: 19.2 0 4 6 167.6 3.92 4 123 18.30 1 3.440 #> 10: 16.4 0 3 8 275.8 3.07 3 180 17.40 0 4.070 #> 11: 15.2 0 3 8 275.8 3.07 3 180 18.00 0 3.780 #> 12: 14.7 0 4 8 440.0 3.23 3 230 17.42 0 5.345 #> 13: 32.4 1 1 4 78.7 4.08 4 66 19.47 1 2.200 #> 14: 15.2 0 2 8 304.0 3.15 3 150 17.30 0 3.435 #> 15: 13.3 0 4 8 350.0 3.73 3 245 15.41 0 3.840 #> 16: 19.2 0 2 8 400.0 3.08 3 175 17.05 0 3.845 #> 17: 27.3 1 1 4 79.0 4.08 4 66 18.90 1 1.935 #> 18: 26.0 1 2 4 120.3 4.43 5 91 16.70 0 2.140 #> 19: 15.8 1 4 8 351.0 4.22 5 264 14.50 0 3.170 #> 20: 19.7 1 6 6 145.0 3.62 5 175 15.50 0 2.770 #> 21: 15.0 1 8 8 301.0 3.54 5 335 14.60 0 3.570 #> mpg am carb cyl disp drat gear hp qsec vs wt #> #> $pv #> $pv$k #> [1] 7 #> #> #> $kknn #> NULL #> #> regr.mse #> 17.01076"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":null,"dir":"Reference","previous_headings":"","what":"Kriging Regression Learner — mlr_learners_regr.km","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Kriging regression. Calls DiceKriging::km() package DiceKriging. predict type hyperparameter \"type\" defaults \"sk\" (simple kriging). additional hyperparameter nugget.stability used overwrite hyperparameter nugget nugget.stability * var(y) training improve numerical stability. recommend value 1e-8. additional hyperparameter jitter can set add N(0, [jitter])-distributed noise data prediction avoid perfect interpolation. recommend value 1e-12.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.km\") lrn(\"regr.km\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, DiceKriging","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Roustant O, Ginsbourger D, Deville Y (2012). “DiceKriging, DiceOptim: Two R Packages Analysis Computer Experiments Kriging-Based Metamodeling Optimization.” Journal Statistical Software, 51(1), 1–55. doi:10.18637/jss.v051.i01 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrKM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"LearnerRegrKM$new() LearnerRegrKM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"LearnerRegrKM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.km.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kriging Regression Learner — mlr_learners_regr.km","text":"","code":"if (requireNamespace(\"DiceKriging\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.km\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Kriging #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, DiceKriging #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> optimisation start #> ------------------ #> * estimation method : MLE #> * optimisation method : BFGS #> * analytical gradient : used #> * trend model : ~1 #> * covariance model : #> - type : matern5_2 #> - nugget : NO #> - parameters lower bounds : 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 1e-10 #> - parameters upper bounds : 2 14 8 801.8 4.34 4 566 16.8 2 7.618 #> - best initial criterion value(s) : -58.39364 #> #> N = 10, M = 5 machine precision = 2.22045e-16 #> At X0, 0 variables are exactly at the bounds #> At iterate 0 f= 58.394 |proj g|= 0.65458 #> At iterate 1 f = 58.174 |proj g|= 0.78365 #> At iterate 2 f = 58.053 |proj g|= 0.20068 #> At iterate 3 f = 58.003 |proj g|= 0.17351 #> At iterate 4 f = 57.483 |proj g|= 0.14905 #> At iterate 5 f = 57.466 |proj g|= 0.070431 #> At iterate 6 f = 57.453 |proj g|= 0.12724 #> At iterate 7 f = 57.414 |proj g|= 0.063327 #> At iterate 8 f = 57.38 |proj g|= 0.058924 #> At iterate 9 f = 57.199 |proj g|= 0.20806 #> At iterate 10 f = 57.171 |proj g|= 0.16029 #> At iterate 11 f = 57.161 |proj g|= 0.051045 #> At iterate 12 f = 57.155 |proj g|= 0.098034 #> At iterate 13 f = 57.149 |proj g|= 0.076632 #> At iterate 14 f = 57.146 |proj g|= 0.023702 #> At iterate 15 f = 57.143 |proj g|= 0.072994 #> At iterate 16 f = 57.136 |proj g|= 0.15658 #> At iterate 17 f = 57.117 |proj g|= 0.26162 #> At iterate 18 f = 57.077 |proj g|= 0.33895 #> At iterate 19 f = 57.018 |proj g|= 0.17888 #> At iterate 20 f = 57.009 |proj g|= 0.12259 #> At iterate 21 f = 57.008 |proj g|= 0.04601 #> At iterate 22 f = 57.007 |proj g|= 0.0161 #> At iterate 23 f = 57.007 |proj g|= 0.016285 #> At iterate 24 f = 57.006 |proj g|= 0.04721 #> At iterate 25 f = 57.004 |proj g|= 0.10892 #> At iterate 26 f = 56.999 |proj g|= 0.22179 #> At iterate 27 f = 56.99 |proj g|= 0.29589 #> At iterate 28 f = 56.985 |proj g|= 0.18398 #> At iterate 29 f = 56.98 |proj g|= 0.01533 #> At iterate 30 f = 56.98 |proj g|= 0.02337 #> At iterate 31 f = 56.979 |proj g|= 0.068303 #> At iterate 32 f = 56.976 |proj g|= 0.12392 #> At iterate 33 f = 56.969 |proj g|= 0.20846 #> At iterate 34 f = 56.953 |proj g|= 0.31837 #> At iterate 35 f = 56.907 |proj g|= 0.39657 #> At iterate 36 f = 56.785 |proj g|= 0.5768 #> At iterate 37 f = 56.616 |proj g|= 0.69008 #> At iterate 38 f = 56.357 |proj g|= 0.50184 #> At iterate 39 f = 56.286 |proj g|= 0.22707 #> At iterate 40 f = 56.242 |proj g|= 0.50681 #> At iterate 41 f = 56.14 |proj g|= 1.1696 #> At iterate 42 f = 56.018 |proj g|= 1.5842 #> At iterate 43 f = 55.983 |proj g|= 0.73268 #> At iterate 44 f = 55.902 |proj g|= 0.44156 #> At iterate 45 f = 55.855 |proj g|= 0.40828 #> At iterate 46 f = 55.842 |proj g|= 0.037859 #> At iterate 47 f = 55.838 |proj g|= 0.080262 #> At iterate 48 f = 55.833 |proj g|= 0.1956 #> At iterate 49 f = 55.82 |proj g|= 0.27206 #> At iterate 50 f = 55.802 |proj g|= 0.21758 #> At iterate 51 f = 55.796 |proj g|= 0.050006 #> At iterate 52 f = 55.795 |proj g|= 0.061304 #> At iterate 53 f = 55.793 |proj g|= 0.11254 #> At iterate 54 f = 55.787 |proj g|= 0.25647 #> At iterate 55 f = 55.772 |proj g|= 0.46121 #> At iterate 56 f = 55.743 |proj g|= 0.77069 #> At iterate 57 f = 55.718 |proj g|= 0.58626 #> At iterate 58 f = 55.685 |proj g|= 0.06202 #> At iterate 59 f = 55.684 |proj g|= 0.02268 #> At iterate 60 f = 55.684 |proj g|= 0.083878 #> At iterate 61 f = 55.683 |proj g|= 0.024401 #> At iterate 62 f = 55.682 |proj g|= 0.0016686 #> At iterate 63 f = 55.682 |proj g|= 0.0016702 #> At iterate 64 f = 55.682 |proj g|= 0.0016726 #> At iterate 65 f = 55.682 |proj g|= 0.0065732 #> At iterate 66 f = 55.682 |proj g|= 0.0067642 #> At iterate 67 f = 55.682 |proj g|= 0.008156 #> At iterate 68 f = 55.682 |proj g|= 0.011045 #> At iterate 69 f = 55.682 |proj g|= 0.044371 #> At iterate 70 f = 55.681 |proj g|= 0.043548 #> At iterate 71 f = 55.677 |proj g|= 0.04273 #> At iterate 72 f = 55.668 |proj g|= 0.2078 #> At iterate 73 f = 55.651 |proj g|= 0.28109 #> At iterate 74 f = 55.603 |proj g|= 0.58369 #> At iterate 75 f = 55.541 |proj g|= 0.3966 #> At iterate 76 f = 55.418 |proj g|= 0.539 #> At iterate 77 f = 55.381 |proj g|= 0.51935 #> At iterate 78 f = 55.361 |proj g|= 0.053448 #> At iterate 79 f = 55.36 |proj g|= 0.005173 #> At iterate 80 f = 55.36 |proj g|= 0.00028756 #> At iterate 81 f = 55.36 |proj g|= 8.3708e-05 #> #> iterations 81 #> function evaluations 90 #> segments explored during Cauchy searches 84 #> BFGS updates skipped 0 #> active bounds at final generalized Cauchy point 7 #> norm of the final projected gradient 8.37075e-05 #> final function value 55.3604 #> #> F = 55.3604 #> final value 55.360421 #> converged #> #> Call: #> DiceKriging::km(design = data, response = task$truth(), control = pv$control) #> #> Trend coeff.: #> Estimate #> (Intercept) 20.5212 #> #> Covar. type : matern5_2 #> Covar. coeff.: #> Estimate #> theta(am) 0.0000 #> theta(carb) 14.0000 #> theta(cyl) 8.0000 #> theta(disp) 801.8000 #> theta(drat) 1.0804 #> theta(gear) 4.0000 #> theta(hp) 566.0000 #> theta(qsec) 1.3130 #> theta(vs) 2.0000 #> theta(wt) 3.2168 #> #> Variance estimate: 31.82454 #> regr.mse #> 16.72725"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Regression Learner — mlr_learners_regr.lm","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Ordinary linear regression. Calls stats::lm().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.lm\") lrn(\"regr.lm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Task type: “regr” Predict Types: “response”, “se” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor” Required Packages: mlr3, mlr3learners, 'stats'","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"contrasts","dir":"Reference","previous_headings":"","what":"Contrasts","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"ensure reproducibility, learner always uses default contrasts: contr.treatment() unordered factors, contr.poly() ordered factors. Setting option \"contrasts\" effect. Instead, set respective hyperparameter use mlr3pipelines create dummy features.","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"LearnerRegrLM$new() LearnerRegrLM$loglik() LearnerRegrLM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-loglik-","dir":"Reference","previous_headings":"","what":"Method loglik()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"Extract log-likelihood (e.g., via stats::logLik() fitted model.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$loglik()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"LearnerRegrLM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Regression Learner — mlr_learners_regr.lm","text":"","code":"if (requireNamespace(\"stats\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.lm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Linear Model #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, stats #> * Predict Types: [response], se #> * Feature Types: logical, integer, numeric, character, factor #> * Properties: weights #> #> Call: #> stats::lm(formula = task$formula(), data = task$data()) #> #> Coefficients: #> (Intercept) am carb cyl disp drat #> 16.30218 3.76393 0.13314 -0.81045 0.02792 0.90348 #> gear hp qsec vs wt #> 0.14509 -0.03059 0.80309 0.36197 -4.11977 #> #> regr.mse #> 4.351582"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Neural Network Regression Learner — mlr_learners_regr.nnet","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Single Layer Neural Network. Calls nnet::nnet.formula() package nnet. Note modern neural networks multiple layers connected via package mlr3torch.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.nnet\") lrn(\"regr.nnet\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, nnet","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"size: Adjusted default: 3L. Reason change: default nnet().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"formula: provided, formula set task$formula().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Ripley BD (1996). Pattern Recognition Neural Networks. Cambridge University Press. doi:10.1017/cbo9780511812651 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrNnet","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"LearnerRegrNnet$new() LearnerRegrNnet$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"LearnerRegrNnet$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.nnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Neural Network Regression Learner — mlr_learners_regr.nnet","text":"","code":"if (requireNamespace(\"nnet\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.nnet\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Single Layer Neural Network #> * Model: - #> * Parameters: size=3 #> * Packages: mlr3, mlr3learners, nnet #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric, factor, ordered #> * Properties: weights #> # weights: 37 #> initial value 8445.242250 #> iter 10 value 346.375403 #> iter 20 value 176.439132 #> iter 30 value 158.345415 #> iter 40 value 139.968094 #> iter 50 value 82.148219 #> iter 60 value 34.713929 #> iter 70 value 34.119941 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> iter 80 value 34.108462 #> final value 34.108462 #> converged #> a 10-3-1 network with 37 weights #> inputs: am carb cyl disp drat gear hp qsec vs wt #> output(s): mpg #> options were - linear output units #> regr.mse #> 11.74087"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":null,"dir":"Reference","previous_headings":"","what":"Ranger Regression Learner — mlr_learners_regr.ranger","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Random regression forest. Calls ranger::ranger() package ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.ranger\") lrn(\"regr.ranger\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Task type: “regr” Predict Types: “response”, “se”, “quantiles” Feature Types: “logical”, “integer”, “numeric”, “character”, “factor”, “ordered” Required Packages: mlr3, mlr3learners, ranger","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"custom-mlr-parameters","dir":"Reference","previous_headings":"","what":"Custom mlr3 parameters","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mtry: hyperparameter can alternatively set via hyperparameter mtry.ratio mtry = max(ceiling(mtry.ratio * n_features), 1). Note mtry mtry.ratio mutually exclusive.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"num.threads: Actual default: 2, using two threads, also respecting environment variable R_RANGER_NUM_THREADS, options(ranger.num.threads = N), options(Ncpus = N), precedence order. Adjusted value: 1. Reason change: Conflicting parallelization via future.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Wright, N. M, Ziegler, Andreas (2017). “ranger: Fast Implementation Random Forests High Dimensional Data C++ R.” Journal Statistical Software, 77(1), 1–17. doi:10.18637/jss.v077.i01 . Breiman, Leo (2001). “Random Forests.” Machine Learning, 45(1), 5–32. ISSN 1573-0565, doi:10.1023/:1010933404324 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrRanger","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"LearnerRegrRanger$new() LearnerRegrRanger$importance() LearnerRegrRanger$oob_error() LearnerRegrRanger$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"importance scores extracted model slot variable.importance. Parameter importance.mode must set \"impurity\", \"impurity_corrected\", \"permutation\"","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-oob-error-","dir":"Reference","previous_headings":"","what":"Method oob_error()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"--bag error, extracted model slot prediction.error.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$oob_error()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"returns-1","dir":"Reference","previous_headings":"","what":"Returns","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"numeric(1).","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"LearnerRegrRanger$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.ranger.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ranger Regression Learner — mlr_learners_regr.ranger","text":"","code":"if (requireNamespace(\"ranger\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.ranger\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Random Forest #> * Model: - #> * Parameters: num.threads=1 #> * Packages: mlr3, mlr3learners, ranger #> * Predict Types: [response], se, quantiles #> * Feature Types: logical, integer, numeric, character, factor, ordered #> * Properties: hotstart_backward, importance, missings, oob_error, #> weights #> Ranger result #> #> Call: #> ranger::ranger(dependent.variable.name = task$target_names, data = task$data(), case.weights = task$weights$weight, num.threads = 1L) #> #> Type: Regression #> Number of trees: 500 #> Sample size: 21 #> Number of independent variables: 10 #> Mtry: 3 #> Target node size: 5 #> Variable importance mode: none #> Splitrule: variance #> OOB prediction error (MSE): 6.165724 #> R squared (OOB): 0.8537504 #> function () #> .__LearnerRegrRanger__importance(self = self, private = private, #> super = super) #> #> regr.mse #> 4.799664"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Vector Machine — mlr_learners_regr.svm","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Support vector machine regression. Calls e1071::svm() package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.svm\") lrn(\"regr.svm\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, e1071","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Cortes, Corinna, Vapnik, Vladimir (1995). “Support-vector networks.” Machine Learning, 20(3), 273–297. doi:10.1007/BF00994018 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrSVM","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Support Vector Machine — mlr_learners_regr.svm","text":"LearnerRegrSVM$new() LearnerRegrSVM$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Support Vector Machine — mlr_learners_regr.svm","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"LearnerRegrSVM$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Vector Machine — mlr_learners_regr.svm","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.svm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Vector Machine — mlr_learners_regr.svm","text":"","code":"if (requireNamespace(\"e1071\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.svm\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } #> : Support Vector Machine #> * Model: - #> * Parameters: list() #> * Packages: mlr3, mlr3learners, e1071 #> * Predict Types: [response] #> * Feature Types: logical, integer, numeric #> * Properties: - #> #> Call: #> svm.default(x = data, y = task$truth()) #> #> #> Parameters: #> SVM-Type: eps-regression #> SVM-Kernel: radial #> cost: 1 #> gamma: 0.1 #> epsilon: 0.1 #> #> #> Number of Support Vectors: 18 #> #> regr.mse #> 14.62665"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":null,"dir":"Reference","previous_headings":"","what":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"eXtreme Gradient Boosting regression. Calls xgboost::xgb.train() package xgboost. compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support. Note using watchlist parameter directly lead problems wrapping mlr3::Learner mlr3pipelines GraphLearner preprocessing steps applied data watchlist. See section Early Stopping Validation .","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"compute GPUs, first need compile xgboost link CUDA. See https://xgboost.readthedocs.io/en/stable/build.html#building--gpu-support.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"dictionary","dir":"Reference","previous_headings":"","what":"Dictionary","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner can instantiated via dictionary mlr3::mlr_learners associated sugar function mlr3::lrn():","code":"mlr_learners$get(\"regr.xgboost\") lrn(\"regr.xgboost\")"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"meta-information","dir":"Reference","previous_headings":"","what":"Meta Information","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Task type: “regr” Predict Types: “response” Feature Types: “logical”, “integer”, “numeric” Required Packages: mlr3, mlr3learners, xgboost","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"early-stopping-and-validation","dir":"Reference","previous_headings":"","what":"Early Stopping and Validation","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"order monitor validation performance training, can set $validate field Learner. information configure valdiation set, see Validation section mlr3::Learner. validation data can also used early stopping, can enabled setting early_stopping_rounds parameter. final (case early stopping best) validation scores can accessed via $internal_valid_scores, optimal nrounds via $internal_tuned_values. internal validation measure can set via eval_metric parameter can mlr3::Measure, function, character string internal xgboost measures. Using mlr3::Measure slower internal xgboost measures, allows use measure tuning validation.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"initial-parameter-values","dir":"Reference","previous_headings":"","what":"Initial parameter values","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"nrounds: Actual default: default. Adjusted default: 1000. Reason change: Without default construction learner error. lightgbm learner default 1000, use . nthread: Actual value: Undefined, triggering auto-detection number CPUs. Adjusted value: 1. Reason change: Conflicting parallelization via future. verbose: Actual default: 1. Adjusted default: 0. Reason change: Reduce verbosity.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Chen, Tianqi, Guestrin, Carlos (2016). “Xgboost: scalable tree boosting system.” Proceedings 22nd ACM SIGKDD Conference Knowledge Discovery Data Mining, 785–794. ACM. doi:10.1145/2939672.2939785 .","code":""},{"path":[]},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"super-classes","dir":"Reference","previous_headings":"","what":"Super classes","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrXgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"internal_valid_scores (named list() NULL) validation scores extracted model$evaluation_log. early stopping activated, contains validation scores model optimal nrounds, otherwise nrounds final model. internal_tuned_values (named list() NULL) early stopping activated, returns list nrounds, extracted $best_iteration model otherwise NULL. validate (numeric(1) character(1) NULL) construct internal validation data. parameter can either NULL, ratio, \"test\", \"predefined\". Returns $best_iteration early stopping activated.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"mlr3::Learner$base_learner() mlr3::Learner$encapsulate() mlr3::Learner$format() mlr3::Learner$help() mlr3::Learner$predict() mlr3::Learner$predict_newdata() mlr3::Learner$print() mlr3::Learner$reset() mlr3::Learner$train()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"LearnerRegrXgboost$new() LearnerRegrXgboost$importance() LearnerRegrXgboost$clone()","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Creates new instance R6 class.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$new()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-importance-","dir":"Reference","previous_headings":"","what":"Method importance()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"importance scores calculated xgboost::xgb.importance().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$importance()"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"Named numeric().","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"objects class cloneable method.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"LearnerRegrXgboost$clone(deep = FALSE)"},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"deep Whether make deep clone.","code":""},{"path":"https://mlr3learners.mlr-org.com/reference/mlr_learners_regr.xgboost.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extreme Gradient Boosting Regression Learner — mlr_learners_regr.xgboost","text":"","code":"if (FALSE) { # \\dontrun{ if (requireNamespace(\"xgboost\", quietly = TRUE)) { # Define the Learner and set parameter values learner = lrn(\"regr.xgboost\") print(learner) # 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 the model print(learner$model) # importance method if(\"importance\" %in% learner$properties) print(learner$importance) # Make predictions for the test rows predictions = learner$predict(task, row_ids = ids$test) # Score the predictions predictions$score() } } # } if (FALSE) { # \\dontrun{ # Train learner with early stopping on spam data set task = tsk(\"mtcars\") # use 30 percent for validation # Set early stopping parameter learner = lrn(\"regr.xgboost\", nrounds = 100, early_stopping_rounds = 10, validate = 0.3 ) # Train learner with early stopping learner$train(task) # Inspect optimal nrounds and validation performance learner$internal_tuned_values learner$internal_valid_scores } # }"},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-090","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.9.0","title":"mlr3learners 0.9.0","text":"CRAN release: 2024-11-23 BREAKING CHANGE: Remove $loglik() method learners. feat: Update hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\") 0.17.0, adding na.action parameter \"missings\" property, poisson splitrule regression new poisson.tau parameter. compatibility: mlr3 0.22.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-080","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.8.0","title":"mlr3learners 0.8.0","text":"CRAN release: 2024-10-25 fix: Hyperparameter set lrn(\"classif.ranger\") lrn(\"regr.ranger\"). Remove alpha minprop hyperparameter. Remove default respect.unordered.factors. Change lower bound max_depth 0 1. Remove se.method lrn(\"classif.ranger\"). feat: use base_margin xgboost learners (#205). fix: validation learner lrn(\"regr.xgboost\") now works properly. Previously training data used. feat: add weights logistic regression , incorrectly removed previous release (#265). BREAKING CHANGE: using internal tuning xgboost learners, eval_metric must now set. achieves one needs make conscious decision performance metric use early stopping. BREAKING CHANGE: Change xgboost default nrounds 1 1000.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-070","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.7.0","title":"mlr3learners 0.7.0","text":"CRAN release: 2024-06-28 feat: LearnerClassifXgboost LearnerRegrXgboost now support internal tuning validation. now also works conjunction mlr3pipelines.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-060","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.6.0","title":"mlr3learners 0.6.0","text":"CRAN release: 2024-03-13 Adaption new paradox version 1.0.0.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-058","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.8","title":"mlr3learners 0.5.8","text":"CRAN release: 2023-12-21 Adaption memory optimization mlr3 0.17.1.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-057","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.7","title":"mlr3learners 0.5.7","text":"CRAN release: 2023-11-21 Added labels learners. Added formula argument nnet learner support feature type \"integer\". Added min.bucket parameter classif.ranger regr.ranger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-056","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.6","title":"mlr3learners 0.5.6","text":"CRAN release: 2023-01-06 Enable new early stopping mechanism xgboost. Improved documentation. fix: unloading mlr3learners removes learners dictionary.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-054","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.4","title":"mlr3learners 0.5.4","text":"CRAN release: 2022-08-15 Added regr.nnet learner. Removed option use weights classif.log_reg. Added default_values() function ranger svm learners. Improved documentation.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-053","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.3","title":"mlr3learners 0.5.3","text":"CRAN release: 2022-05-25 Survival learners moved mlr3extralearners (maintained Github): https://github.com/mlr-org/mlr3extralearners","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-052","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.2","title":"mlr3learners 0.5.2","text":"CRAN release: 2022-01-22 learners now reorder columns predict task according order columns training task. Removed workaround old mlr3 versions.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-051","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.1","title":"mlr3learners 0.5.1","text":"CRAN release: 2021-11-19 eval_metric() now explicitly set xgboost learners silence deprecation warning. Improved added hyperparameter mtry.ratio converted mtry simplify tuning. Multiple updates hyperparameter sets.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-050","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.5.0","title":"mlr3learners 0.5.0","text":"CRAN release: 2021-08-17 Fixed internal encoding positive class classification learners based glm glmnet (#199). predictions previous versions correct, estimated coefficients wrong sign. Reworked handling lambda s glmnet learners (#197). Learners based glmnet now support extract selected features (#200). Learners based kknn now raise exception k >= n (#191). Learners based ranger now come virtual hyperparameter mtry.ratio set hyperparameter mtry based proportion features use. Multiple learners now support extraction log-likelihood (via method $loglik()), allowing calculate measures like AIC BIC mlr3 (#182).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-045","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.5","title":"mlr3learners 0.4.5","text":"CRAN release: 2021-03-18 Fixed SVM learners new release package e1071.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-044","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.4","title":"mlr3learners 0.4.4","text":"CRAN release: 2021-03-15 Changed hyperparameters learners make run sequentially defaults. new function set_threads() mlr3 provides generic way set respective hyperparameter desired number parallel threads. Added survival:aft objective surv.xgboost Removed hyperparameter predict.ranger learners (#172).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-043","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.3","title":"mlr3learners 0.4.3","text":"CRAN release: 2020-12-08 Fixed stochastic test failures solaris. Fixed surv.ranger, c.f. https://github.com/mlr-org/mlr3proba/issues/165. Added classif.nnet learner (moved mlr3extralearners).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-042","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.2","title":"mlr3learners 0.4.2","text":"CRAN release: 2020-11-11 Fixed bug survival random forest LearnerSurvRanger.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-041","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.1","title":"mlr3learners 0.4.1","text":"CRAN release: 2020-10-07 Disabled glmnet tests solaris. Removed dependency orphaned package bibtex.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-040","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.4.0","title":"mlr3learners 0.4.0","text":"CRAN release: 2020-09-25 Fixed potential label switch classif.glmnet classif.cv_glmnet predict_type set \"prob\" (#155). Fixed learners package glmnet robust order features changed train predict.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-030","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.3.0","title":"mlr3learners 0.3.0","text":"CRAN release: 2020-08-29 $model slot {kknn} learner now returns list containing information used predict step. , slot empty training step kknn. Compact -memory representation R6 objects save space saving mlr3 objects via saveRDS(), serialize() etc. glmnet learners: penalty.factor vector param, ParamDbl (#141) glmnet: Add params mxitnr epsnr glmnet v4.0 update Add learner surv.glmnet (#130) Suggest package mlr3proba (#144) Add learner surv.xgboost (#135) Add learner surv.ranger (#134)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-020","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.2.0","title":"mlr3learners 0.2.0","text":"CRAN release: 2020-04-22 Split glmnet learner cv_glmnet glmnet (#99) glmnet learners: Add predict.gamma newoffset arg (#98) now test learners can constructed without parameters. new custom “Paramtest” lives inst/paramtest added. test checks arguments upstream train & predict functions ensures parameters implemented respective mlr3 learner (#96). lot missing parameters added learners. See #96 complete list. Add parameter interaction_constraints {xgboost} learners (#97).","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-0169000","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6.9000","title":"mlr3learners 0.1.6.9000","text":"Added learner classif.multinom package nnet. Learners regr.lm classif.log_reg now ignore global option \"contrasts\". Add vignette additional-learners.Rmd listing mlr3 custom learners Move Learner*Glmnet Learner*CVGlmnet add Learner*Glmnet (without internal tuning) (#90)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"xgboost-0-1-6-9000","dir":"Changelog","previous_headings":"","what":"XGBoost","title":"mlr3learners 0.1.6.9000","text":"Add parameter interaction_constraints (#95)","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-016","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.6","title":"mlr3learners 0.1.6","text":"CRAN release: 2020-02-10 Added missing feature type logical() multiple learners.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-015","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.5","title":"mlr3learners 0.1.5","text":"CRAN release: 2019-11-25 Added parameter parameter dependencies regr.glmnet, regr.km, regr.ranger, regr.svm, regr.xgboost, classif.glmnet, classif.lda, classif.naivebayes, classif.qda, classif.ranger classif.svm. glmnet: Added relax parameter (v3.0) xgboost: Updated parameters v0.90.0.2","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-014","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.4","title":"mlr3learners 0.1.4","text":"CRAN release: 2019-10-29 Fixed bug *.xgboost *.svm triggered columns reordered $train() $predict().","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-013","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.3","title":"mlr3learners 0.1.3","text":"CRAN release: 2019-09-17 Changes work new mlr3::Learner API. Improved documentation. Added references. add new parameters xgboost version 0.90.2 add parameter dependencies xgboost","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-012","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.2","title":"mlr3learners 0.1.2","text":"CRAN release: 2019-08-26 Maintenance release.","code":""},{"path":"https://mlr3learners.mlr-org.com/news/index.html","id":"mlr3learners-011","dir":"Changelog","previous_headings":"","what":"mlr3learners 0.1.1","title":"mlr3learners 0.1.1","text":"CRAN release: 2019-08-05 Initial upload CRAN.","code":""}]