hanaml.train.Rd
Unified API for model training with parameter tuning
hanaml.train(
data,
method,
trControl = NULL,
tuneGrid = NULL,
metric,
param.search.strategy = NULL,
resampling.method = NULL,
...
)
DataFrame
DataFrame containting the data.
character
Name of HANA ML functions.
train.control
Pass train.control function.
param.grid
Pass param.grid function.
character
Scoring metric. Identical to evaluation.metric in HANA ML functions.
then no model evaluation or parameter selection will be activated.
No default value.
c("grid", "random"), optional
Specifies the method to activate parameter selection.
If not specified, model parameter selection shall not be triggered.
character, optional
Specifies the resampling values.
Reserved parameter.
a HANA ML object.
> trctrl <- hanaml.trainControl(resampling.method = "cv",
param.search.strategy = "grid",
fold.num = 2, repeat.times = 2,
random.state = 1,
progress.indicator.id = "TEST")
> paramgrid <- hanaml.expand.grid(enet.lambda = c(1e-2, 1e-3, 0.05),
enet.alpha = c(0.1, 0.5, 0.03))
> lr <- hanaml.train(data = df.fit.enet,
method = "LinearRegression",
trControl = trctrl,
tuneGrid = paramgrid,
metric = "rmse",
key = "ID", label = "Y",
solver = "admm")