lolo
lolo copied to clipboard
Fail on invalid subsetStrategy
Currently io.citrine.lolo.learners.RandomForest
(and io.citrine.lolo.learners.ExtraRandomTrees
, which emulates the RF interface) defaults to automatic subset strategy selection when the parameter subsetStrategy
is an invalid string. This is an opportunity for an unobservable error. I propose hardening this interface with a small modification: throw an exception when the parameter doesn't match. An informative exception should also be thrown if the type doesn't match.
Encapsulating the available options in a SubsetStrategy
class would also present a more foolproof interface, and would address the type laxity that @mrupp-citrine pointed out, but I don't think that's worth the trouble.
In favor of that check, and agree on that a separate class is overkill.