lolo icon indicating copy to clipboard operation
lolo copied to clipboard

Fail on invalid subsetStrategy

Open gregor-robinson opened this issue 4 years ago • 1 comments

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.

gregor-robinson avatar Mar 31 '20 19:03 gregor-robinson

In favor of that check, and agree on that a separate class is overkill.

mrupp-citrine avatar Apr 02 '20 07:04 mrupp-citrine