modifyCode: Modify production code to be model specific

Description Usage Arguments Value Author(s) Examples

View source: R/modifyCode.R

Description

Modifies the production code generated by the autoPreProcess function to be specific to a trained model object. Results in less code and only uses the features used in the final trained model. The saveCode function can then be used to save the code.

Usage

1
modifyCode(trainedModel, edaFrame, codeFrame)

Arguments

trainedModel

[mlrObject | Required] A trained model from the mlr R library or models returned from autoML / autoLearn

edaFrame

[data.frame | Required] EDA frame returned by autoPreProcess

codeFrame

[data.frame | Required] Code frame returned by autoPreProcess

Value

Data.frame object containing the modified code

Author(s)

Xander Horn

Examples

1
2
3
res <- autoPreProcess(train = iris, target = "Species")
models <- autoLearn(train = res$data, target = "Species", trainMode = "reduced")
code <- modifyCode(trainedModel = models$RandomForest_reduced$model, edaFrame = res$dataSummary, codeFrame = res$code)

XanderHorn/autoML documentation built on Aug. 5, 2020, 11:45 a.m.