bigframes.ml.model_selection.KFold.split#
- KFold.split(X: DataFrame | Series | DataFrame | Series, y: DataFrame | Series | DataFrame | Series | None = None) Generator[tuple[DataFrame | Series | None, ...], None, None][source]#
Generate indices to split data into training and test set.
- Parameters:
X (bigframes.dataframe.DataFrame or bigframes.series.Series) – BigFrames DataFrame or Series of shape (n_samples, n_features) Training data, where n_samples is the number of samples and n_features is the number of features.
y (bigframes.dataframe.DataFrame, bigframes.series.Series or None) – BigFrames DataFrame, Series of shape (n_samples,) or None. The target variable for supervised learning problems. Default to None.
- Yields:
X_train (bigframes.dataframe.DataFrame or bigframes.series.Series) – The training data for that split.
- X_test (bigframes.dataframe.DataFrame or bigframes.series.Series):
The testing data for that split.
- y_train (bigframes.dataframe.DataFrame, bigframes.series.Series or None):
The training label for that split.
- y_test (bigframes.dataframe.DataFrame, bigframes.series.Series or None):
The testing label for that split.