Learn R Programming

mlr (version 1.1-18)

setHyperPars: Set the hyperparameters of a learner object.

Description

Set the hyperparameters of a learner object.

Usage

setHyperPars(learner, ..., par.vals)

Arguments

Value

[Learner] with changed hyperparameters.

See Also

See getHyperPars for a function to retrieve the currently set hyperparameters. To get a list of all hyperparameters of a learner, see the par.set slot of the Learner object.

Examples

Run this code
cl1 <- makeLearner("classif.ksvm", sigma=1)
cl2 <- setHyperPars(cl1, sigma=10, par.vals=list(C=2))
print(cl1)
# note the now set and altered hyperparameters:
print(cl2)

Run the code above in your browser using DataLab