mlr-org / ParamHelpers

Helpers for parameters in black-box optimization, tuning and machine learning.
https://paramhelpers.mlr-org.com
Other
25 stars 9 forks source link

Added modifyParam.R and associated test file #230

Closed pday2 closed 4 years ago

pday2 commented 4 years ago

Added modifyParam.R and test_modifyParam.R modifyParam allows a user to change the value/range of a parameter in a parameter set.
Usage example: ms = modifyParam(ps, id="power", lower = 444, upper = 444) where ms is the new parameter set, ps is the paramSet to change, id is parameter to change and lower and upper are the new values. Can be one value as the above example or a range of values.
Also works for discrete parameters as in: ms = modifyParam(ps, id="gas", lower = list("Argon", "Nitrogen"))

modifyParam validates the new values versus those in the original paramSet, and returns a new cleaned up parameter set.

Was intended to be used with some slight changes to mlrMBO to constrain a parameter in a focus search for an optimal value of another parameter.

pday2 commented 4 years ago

sounds like param helpers is being updated