def compute_metrics_cv(self, X, Y):
"""Compute cross-validated metrics.
Trains this model on data X with labels Y.
Returns a MetricList with the name, scoring type, and value for each
Metric. Note that these values may be numpy floating points, and should
be converted prior to insertion in a database.
Parameters
----------
X : numpy array-like or pd.DataFrame
data
Y : numpy array-like or pd.DataFrame or pd.DataSeries
labels
"""
scorings, scorings_ = self._get_scorings()
# compute scores
scores = self.cv_score_mean(X, Y, scorings_)
# unpack into MetricList
metric_list = self.scores_to_metriclist(scorings, scores)
return metric_list
评论列表
文章目录