bigframes.bigquery.ml.predict#
- bigframes.bigquery.ml.predict(model: BaseEstimator | str | Series, input_: DataFrame | DataFrame | str, *, threshold: float | None = None, keep_original_columns: bool | None = None, trial_id: int | None = None) DataFrame[source]#
Runs prediction on a BigQuery ML model.
See the BigQuery ML PREDICT function syntax for additional reference.
- Parameters:
model (bigframes.ml.base.BaseEstimator or str) – The model to use for prediction.
input (Union[bigframes.pandas.DataFrame, str]) – The DataFrame or query to use for prediction.
threshold (float, optional) – The threshold to use for classification models.
keep_original_columns (bool, optional) – Whether to keep the original columns in the output.
trial_id (int, optional) – An INT64 value that identifies the hyperparameter tuning trial that you want the function to evaluate. The function uses the optimal trial by default. Only specify this argument if you ran hyperparameter tuning when creating the model.
- Returns:
The prediction results.
- Return type: