ModellingParams-class: Parameters for Data Modelling Specification

ModellingParamsR Documentation

Parameters for Data Modelling Specification

Description

Collects and checks necessary parameters required for data modelling. Apart from data transfomation that needs to be done within cross-validation (e.g. subtracting each observation from training set mean), feature selection, model training and prediction, this container also stores a setting for class imbalance rebalancing.

Usage

ModellingParams(
  balancing = c("downsample", "upsample", "none"),
  transformParams = NULL,
  selectParams = SelectParams("t-test"),
  trainParams = TrainParams("DLDA"),
  predictParams = PredictParams("DLDA"),
  doImportance = FALSE
)

Arguments

balancing

Default: "downsample". A character value specifying what kind of class balancing to do, if any.

transformParams

Parameters used for feature transformation inside of C.V. specified by a TransformParams instance. Optional, can be NULL.

selectParams

Parameters used during feature selection specified by a SelectParams instance. By default, parameters for selection based on differences in means of numeric data. Optional, can be NULL.

trainParams

Parameters for model training specified by a TrainParams instance. By default, uses diagonal LDA.

predictParams

Parameters for model training specified by a PredictParams instance. By default, uses diagonal LDA.

doImportance

Default: FALSE. Whether or not to carry out removal of each feature, one at a time, which was chosen and then retrain and model and predict the test set, to measure the change in performance metric. Can also be set to TRUE, if required. Modelling run time will be noticeably longer.

Author(s)

Dario Strbenac

Examples


  #if(require(sparsediscrim))
  #{
     ModellingParams() # Default is differences in means selection and DLDA.
     ModellingParams(selectParams = NULL, # No feature selection before training.
                     trainParams = TrainParams("randomForest"),
                     predictParams = PredictParams("randomForest"))
  #}

DarioS/ClassifyR documentation built on Dec. 19, 2024, 8:22 p.m.