-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[RFC][MRG] ENH EstimatorCVMixin class #7305
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
Conversation
4fada2b
to
df0faa1
Compare
But most specialised CV implementations ( At this point, I don't see us gaining much from such a refactoring. |
No, you can't share ducktyping delegation so easily, nor docstrings. |
I was thinking we could add one to unify the interface of |
@raghavrv can you maybe focus on things that are release relevant for this week and the next? That would be very helpful. Thanks :) |
Yes ofcourse! This PR was started just as I mentioned here and as I noted at the PR description... For discussion after release of 0.18 not for now... ;) |
BTW @amueller just to clarify everything currently tagged with 0.18 is release critical correct? Or are there false positives in tagging? |
there might be false positives ;) |
and false negatives |
@jnothman @amueller Could we revisit this now? @amueller And responding to your earlier question in the other PR
Currently only
Right now since this just refactors the Mixin class out of Additionally we can use this to design our validation API? |
I'm not too familiar with this part of the code. What is the explicit benefit of this change? |
@raghavrv I want to get out 0.18.1 first ;) |
Deja vu ;) But yes I'm working on it. :) |
Please, @raghavrv, can you add to the description precisely what you propose to be shared/provided by this mixin? |
For instance
When I opened this I thought it would be nice to refactor the Now after Andy brought up the question of a separate validation set instead of cross-validation. I thought maybe we could use this mixin to specify a new method for passing the validation set explicitly... def validated_fit(X_train, y_train, X_validate, y_validate):
X_all = np.vstack(X_train, X_validate)
y_all = np.vstack(y_train, y_validate)
test_folds = np.hstack((np.zeros(X_train.shape[0]), np.ones(X_test.shape[0]))))
self.cv = PredefinedSplit(test_folds)
return self.fit(X_all, y_all) (Not sure how sensible that train of thought was...) |
I am -1 for adding new methods. And I don't think there's enough shared On 26 October 2016 at 00:01, Raghav RV notifications@github.com wrote:
|
Thanks for the comment :) I'll leave this closed and try to subclass from |
Adds a new
EstimatorCVMixin
to be used for all Estimators with CV search of hyper params.This mixin will provision enabling the
predict
methods of thebest_estimator_
available to the inheriting class.@jnothman @amueller @agramfort (Up for discussion after the release of 0.18)