Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Incomplete
-
None
-
None
-
None
Description
Hi, I would like to add randomized search support for the Cross-Validator API. It should be quite straightforward to add with the present abstractions.
Here is the proposed API:
(Names are up for debate)
Proposed Classes:
"ParamSamplerBuilder" or a "ParamRandomizedBuilder" that returns an
Array of ParamMaps
Proposed Methods:
"addBounds"
"addSampler"
"setNumIter"
Code example:
def sampler(): Double = { Math.pow(10.0, -5 + Random.nextFloat * (5 - (-5)) } val paramGrid = new ParamRandomizedBuilder() .addSampler(lr.regParam, sampler) .addBounds(lr.elasticNetParam, 0.0, 1.0) .setNumIter(10) .build()
Let me know your thoughts!