csinva / imodels

Interpretable ML package 🔍 for concise, transparent, and accurate predictive modeling (sklearn-compatible).
https://csinva.io/imodels
MIT License
1.34k stars 119 forks source link

Fix #176 about BoostedRulesClassifier, BoostedRulesRegressor #177

Closed jckkvs closed 1 year ago

jckkvs commented 1 year ago

ref. https://scikit-learn.org/stable/developers/develop.html

csinva commented 1 year ago

Thanks for your interest and contribution to the package!

Did this actually fix an error that was being thrown in #176? I would prefer not to to have the model be initialized in the function definition (since it will be evaluated every time someone imports the package), but if it is fixing an actual error than we can do it.

jckkvs commented 1 year ago

@csinva

I don't fully understand your code, but I'm wondering what you implement partial(DecisionTreeRegressor, max_depth=1) for.

since it will be evaluated every time someone imports the package

Sorry, I don't quite understand what you mean above, but this fixing can solve the error.