Skip to contents

fitting in best model

Usage

fitBestModel(
  optResult,
  metric,
  model,
  formula,
  trainingData,
  splitedData,
  modelName
)

Arguments

optResult

The result object of bayesOptCV

metric

Baseline metric for evaluating model performance (classification: "roc_auc" (default), "accuracy" / regression: "rmse" (default), "rsq")

model

The model object including the list of hyperparameters, engine and mode.

formula

formula for modeling

trainingData

The training data.

splitedData

The whole dataset including the information of each fold

modelName

The name of model defined by the algorithm and engine selected by user

Details

Get the bayesOptCV function's return value and fit the model.