MachineLearningMulti: Create an ensemble or comparison table of new MachineLearning...

View source: R/ensemble.R

MachineLearningMultiR Documentation

Create an ensemble or comparison table of new MachineLearning and/or Regression models

Description

Create an ensemble or comparison table of new MachineLearning and/or Regression models

Usage

MachineLearningMulti(
  formula,
  data = NULL,
  subset = NULL,
  weights = NULL,
  evaluation.subset = NULL,
  missing = "Exclude cases with missing data",
  show.labels = FALSE,
  seed = 12321,
  models.args = NULL,
  compare.only = FALSE,
  optimal.ensemble = FALSE,
  output = "Comparison"
)

Arguments

formula

A formula of the form groups ~ x1 + x2 + ... That is, the response is the grouping factor and the right hand side specifies the (non-factor) discriminators, and any transformations, interactions, or other non-additive operators apart from . will be ignored.

data

A data.frame from which variables specified in formula are preferentially to be taken.

subset

An optional vector specifying a subset of observations to be used in the fitting process, or, the name of a variable in data. It may not be an expression.

weights

An optional vector of sampling weights, or the name of a variable in data. It may not be an expression.

evaluation.subset

An optional vector specifying a subset of observations to be used for evaluating the models. If not specified, models will only be compared on the training data. If models are not trained on the whole sample To evaluate on the whole sample, a subset must still be specified.

missing

How missing data is to be treated. Options: "Error if missing data", "Exclude cases with missing data", or "Imputation (replace missing values with estimates)".

show.labels

Shows the variable labels, as opposed to the labels, in the outputs, where a variables label is an attribute (e.g., attr(foo, "label")).

seed

The random number seed.

models.args

A list of lists of arguments to be passed to MachineLearning to create each model.

compare.only

Logical; whether to just produce a table comparing the models or additionally combine them to make a new ensemble model.

optimal.ensemble

Logical; whether to find the ensemble with the best accuracy or r-squared, calculated on the evaluation.subset if given, else on the training data. Ignored if compare.only is TRUE.

output

If compare.only is FALSE, one of "Comparison" which produces a table comparing the models, or "Ensemble" which produces a ConfusionMatrix.


Displayr/flipMultivariates documentation built on Feb. 26, 2024, 12:39 a.m.