predict_proba

TabularEndpoint.predict_proba(data: str | Path | DataFrame, train_data: str | Path | DataFrame | None = None, label: str | None = None, *, include_predict: bool = True, **inference_kwargs: Any) → tuple[Series, DataFrame | Series] | DataFrame | Series[source]

Predict class probabilities for data with the deployed endpoint.

For regression, the probability result is identical to the prediction. For inputs above the payload limit, use autogluon.cloud.TabularCloudPredictor.predict_proba() or autogluon.cloud.TabularFoundationModel.predict_proba() instead.

Parameters:
  • data (str | pathlib.Path | pd.DataFrame) – Rows to predict, as a pd.DataFrame or local/S3 path to a data file.

  • train_data (str | pathlib.Path | pd.DataFrame | None, default = None) – Labeled examples the foundation model is fit on. Required for foundation model endpoints; must be None for trained predictor endpoints.

  • label (str | None, default = None) – Name of the label column in train_data. Required if and only if train_data is passed.

  • include_predict (bool, default = True) – Whether to return the predictions along with the probabilities. Both are computed in the same request.

  • **inference_kwargs (Any) – Additional args passed to TabularPredictor.predict_proba on the endpoint.

Returns:

tuple[pd.Series, pd.DataFrame | pd.Series] | pd.DataFrame | pd.Series – (prediction, predict_probability) if include_predict is True, otherwise predict_probability.

SageMaker API

  • InvokeEndpoint: sends the data to the endpoint and returns the predictions. The payload is limited to 6 MB (4 MB for serverless endpoints).