ngboost
ngboost copied to clipboard
Add set_params for sklearn compatibility.
Add set_params, get_params for sklearn compatibility. This change makes it easier to use with optimization libraries such as optuna or GridSearchCV. https://scikit-learn.org/stable/modules/generated/sklearn.base.BaseEstimator.html
Here is the pseudo code.
model = NGBoost(Base=default_tree_learner, Dist=Normal, natural_gradient=True, verbose=False)
def objective(trial):
return something
study = optuna.create_study()
study.optimize(objective, n_trials=10)
model.set_params(study.best_params)
@jckkvs It's still failing, I tried to push but I'd need permissions on the fork you have. You'll still need to run black for this to pass so, black ngboost/ngboost.py
should do it.
@ryan-wolbeck I applied black to ngboost.py
@jckkvs can you pull/merge the current version of master into this PR? It should fix the f-string issue, @robertsont pushed a fix in that with the version bump https://github.com/stanfordmlgroup/ngboost/pull/286/files. So pulling master should make this PR pass
bumping this @jckkvs, is this clear or do you need additional support?
@jckkvs can you make the required updates here? I'll be closing this next week if it doesn't get resolved and pushing fixes on my own.
implemented and released in another PR