-
-
Notifications
You must be signed in to change notification settings - Fork 560
Using multiple classifier visualizers #829
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
Comments
This is still one of our primary pain points that we're trying to resolve (e.g. #297, #623, #498, visual pipelines, model reports, etc.) and we haven't quite figured it out yet, but this is absolutely on our radar to handle soon! Many of our visualizers do require access to the training data in order to make visualization decisions and we haven't had the opportunity to dive in depth into the There are a couple of workarounds that I do in practice, though they tend to be about specific visualizers. For example, in the case of _, axes = plot.subplots(ncols=2)
prcurve = PrecisionRecallCurve(clf, ax=axes[0])
rocauc = ROCAUC(clf, ax=axes[1])
prcurve.fit(X_train, y_train)
prcurve.score(X_test, y_test)
rocauc.score(X_test, y_test)
prcurve.finalize()
rocauc.finalize()
plt.show() Of course, this requires some knowledge of what fit in each visualizer does, so that's not ideal, nor a long term solution. Another hack that I use fairly often is to just create a fitted model wrapper (and yes, this is not another long term solution): class FittedEstimator(object):
def __init__(self, model):
self.model = model
def fit(self, X, y):
return self
def predict(self, X):
return self.model.predict(X)
def score(self, X, y):
return self.model.score(X, y)
def get_params(self):
return self.model.get_params() But potentially they may be helpful in the interim! Our ideal solutions are:
However, if you think that this is critical, we could add an |
Thanks for your input. Can you say why the PrecisionRecallCurve needs access to |
The interface I would use for any plotting function would be |
I think this can be closed as a duplicate of #297. Thanks! |
I feel like I'm still missing something wrt the interface.
It looks like PrecisionRecallCurve and ROCAUC fit the model before plotting, and the convenience function does so as well.
How would I plot both of them for a given classifier?
Thanks!
The text was updated successfully, but these errors were encountered: