Environment which stores various information to allow objects to examine and introspect their structure and properties (c.f. Reflections).

This environment be modified by third-party packages, e.g. by adding information about new task types or by extending the set of allowed feature types.

The following objects are set by mlr3:

  • data_formats (character())
    Vectors of supported data formats, e.g. "data.table" or "Matrix".

  • task_types (data.table())
    Table with task type ("type"), the implementing package ("pkg"), and the names of the generators of the corresponding Task ("task"), Learner ("learner"), Prediction ("prediction") and Measure ("measure").

  • task_feature_types (named character())
    Vector of base R types supported as Task features, named with a 3 letter abbreviation.

  • task_row_roles (character())
    Vector of supported row roles for a Task.

  • task_col_roles (list of character())
    List of vectors of supported column roles for a Task, named by their task type.

  • task_properties (list of character())
    List of vectors of supported Task properties, named by their task type.

  • learner_properties (list of character())
    List of vectors of supported Learner properties, named by their task type.

  • learner_predict_types (list of list of character())
    List of lists of supported Learner predict_types, named by their task type. The inner list translates the "predict_type" to all predict types returned, e.g. predict type "prob" for a LearnerClassif provides the probabilities as well as the predicted labels, therefore "prob" maps to c("response", "prob").

  • learner_predict_types (list of list of character())
    List of lists of supported Learner predict_types, named by their task type.

  • predict_sets (character())
    Vector of possible predict sets. Currently supported are "train" and "test".

  • measure_properties (list of character())
    List of vectors of supported Measure properties, named by their task type.

  • default_measures (list of character())
    List of keys for the default Measures, named by their task type.

  • rr_names (character())
    Names of the objects stored in a ResampleResult.

  • auto_converters (environment())
    Environment of converter functions used for rbind-ing data to tasks. Functions are named using the pattern "[from_type]___[to_type]". Can be extended by third-party with additional converters.

mlr_reflections

Format

environment.

Examples

ls.str(mlr_reflections)
#> auto_converters : <environment: 0x5573f4f8a6d0> #> data_formats : chr [1:2] "data.table" "Matrix" #> default_measures : List of 2 #> $ classif: chr "classif.ce" #> $ regr : chr "regr.mse" #> learner_predict_types : List of 2 #> $ classif:List of 2 #> $ regr :List of 3 #> learner_properties : List of 2 #> $ classif: chr [1:7] "missings" "weights" "importance" "selected_features" ... #> $ regr : chr [1:5] "missings" "weights" "importance" "selected_features" ... #> measure_properties : List of 2 #> $ classif: chr [1:4] "na_score" "requires_task" "requires_learner" "requires_train_set" #> $ regr : chr [1:4] "na_score" "requires_task" "requires_learner" "requires_train_set" #> predict_sets : chr [1:2] "train" "test" #> rr_names : chr [1:5] "task" "learner" "resampling" "iteration" "prediction" #> task_col_roles : List of 2 #> $ regr : chr [1:7] "feature" "target" "name" "order" ... #> $ classif: chr [1:7] "feature" "target" "name" "order" ... #> task_feature_types : Named chr [1:7] "logical" "integer" "numeric" "character" "factor" ... #> task_properties : List of 2 #> $ classif: chr [1:5] "strata" "groups" "weights" "twoclass" ... #> $ regr : chr [1:3] "strata" "groups" "weights" #> task_row_roles : chr [1:2] "use" "validation" #> task_types : Classes ‘data.table’ and 'data.frame': 2 obs. of 6 variables: #> $ type : chr "classif" "regr" #> $ package : chr "mlr3" "mlr3" #> $ task : chr "TaskClassif" "TaskRegr" #> $ learner : chr "LearnerClassif" "LearnerRegr" #> $ prediction: chr "PredictionClassif" "PredictionRegr" #> $ measure : chr "MeasureClassif" "MeasureRegr"