bigframes.ml.ensemble.XGBClassifier.score#
- XGBClassifier.score(X:DataFrame|Series|DataFrame|Series,y:DataFrame|Series|DataFrame|Series)[source]#
Return the mean accuracy on the given test data and labels.
In multi-label classification, this is the subset accuracy,which is a harsh metric since you require thateach label set be correctly predicted for each sample.
Note
Output matches that of the BigQuery ML.EVALUATE function.See:https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-evaluate#classification_modelsfor the outputs relevant to this model type.
- Parameters:
X (bigframes.dataframe.DataFrame orbigframes.series.Series) – DataFrame of shape (n_samples, n_features). Test samples.
y (bigframes.dataframe.DataFrame orbigframes.series.Series) – DataFrame of shape (n_samples,) or (n_samples, n_outputs). Truelabels forX.
- Returns:
A DataFrame of the evaluation result.
- Return type: