def score(self, X, y=None, **kwargs):
"""
Generates the Scikit-Learn precision_recall_fscore_support
Parameters
----------
X : ndarray or DataFrame of shape n x m
A matrix of n instances with m features
y : ndarray or Series of length n
An array or series of target or class values
Returns
-------
ax : the axis with the plotted figure
"""
y_pred = self.predict(X)
self.scores = precision_recall_fscore_support(y, y_pred)
self.support = dict(zip(self.classes_, self.scores[-1]))
return self.draw()
评论列表
文章目录