setHyperPars | R Documentation |
Set the hyperparameters of a learner object.
setHyperPars(learner, ..., par.vals = list())
learner |
(Learner | |
... |
(any) |
par.vals |
(list) |
Learner.
If a named (hyper)parameter can't be found for the given learner, the 3 closest (hyper)parameter names will be output in case the user mistyped.
Other learner:
LearnerProperties
,
getClassWeightParam()
,
getHyperPars()
,
getLearnerId()
,
getLearnerNote()
,
getLearnerPackages()
,
getLearnerParVals()
,
getLearnerParamSet()
,
getLearnerPredictType()
,
getLearnerShortName()
,
getLearnerType()
,
getParamSet()
,
helpLearner()
,
helpLearnerParam()
,
makeLearner()
,
makeLearners()
,
removeHyperPars()
,
setId()
,
setLearnerId()
,
setPredictThreshold()
,
setPredictType()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.