R/setHyperPars.R
Set the hyperparameters of a learner object.
setHyperPars(learner, ..., par.vals = list())
| learner | (Learner | |
|---|---|
| ... | (any) |
| par.vals | (list) |
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,
helpLearnerParam,
helpLearner, makeLearners,
makeLearner, removeHyperPars,
setId, setLearnerId,
setPredictThreshold,
setPredictType
cl1 = makeLearner("classif.ksvm", sigma = 1) cl2 = setHyperPars(cl1, sigma = 10, par.vals = list(C = 2)) print(cl1)#> Learner classif.ksvm from package kernlab #> Type: classif #> Name: Support Vector Machines; Short name: ksvm #> Class: classif.ksvm #> Properties: twoclass,multiclass,numerics,factors,prob,class.weights #> Predict-Type: response #> Hyperparameters: fit=FALSE,sigma=1 #>#> Learner classif.ksvm from package kernlab #> Type: classif #> Name: Support Vector Machines; Short name: ksvm #> Class: classif.ksvm #> Properties: twoclass,multiclass,numerics,factors,prob,class.weights #> Predict-Type: response #> Hyperparameters: fit=FALSE,sigma=10,C=2 #>