bigframes.ml.ensemble.RandomForestClassifier.fit#
- RandomForestClassifier.fit(X: DataFrame | Series | DataFrame | Series, y: DataFrame | Series | DataFrame | Series, X_eval: DataFrame | Series | DataFrame | Series | None = None, y_eval: DataFrame | Series | DataFrame | Series | None = None) _T#
Build a forest of trees from the training set (X, y).
- Parameters:
X (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) – Series or DataFrame of shape (n_samples, n_features). Training data.
y (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) – Series or DataFrame of shape (n_samples,) or (n_samples, n_targets). Target values. Will be cast to X’s dtype if necessary.
X_eval (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) – Series or DataFrame of shape (n_samples, n_features). Evaluation data.
y_eval (bigframes.dataframe.DataFrame or bigframes.series.Series or pandas.core.frame.DataFrame or pandas.core.series.Series) – Series or DataFrame of shape (n_samples,) or (n_samples, n_targets). Evaluation target values. Will be cast to X_eval’s dtype if necessary.
- Returns:
Fitted estimator.
- Return type:
ForestModel