Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail on invalid subsetStrategy #221

Open
gregor-robinson opened this issue Mar 31, 2020 · 1 comment
Open

Fail on invalid subsetStrategy #221

gregor-robinson opened this issue Mar 31, 2020 · 1 comment
Assignees

Comments

@gregor-robinson
Copy link
Contributor

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 gregor-robinson self-assigned this Mar 31, 2020
@mrupp-citrine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants