bigframes.ml.cluster.KMeans.predict#
- KMeans.predict(X: DataFrame | Series | DataFrame | Series) DataFrame[source]#
Predict the closest cluster each sample in X belongs to.
- Parameters:
X (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) – DataFrame of shape (n_samples, n_features). New data to predict.
- Returns:
DataFrame of shape (n_samples, n_input_columns + n_prediction_columns). Returns predicted labels.
- Return type: