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
datawith 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()orautogluon.cloud.TabularFoundationModel.predict_proba()instead.- Parameters:
data (str | pathlib.Path | pd.DataFrame) – Rows to predict, as a
pd.DataFrameor 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
Nonefor trained predictor endpoints.label (str | None, default = None) – Name of the label column in
train_data. Required if and only iftrain_datais 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 the
predict_probacall of the AutoGluon predictor on the endpoint. For trained predictor endpoints with an image feature, passimage_columnto name the column ofdatawith absolute paths to local images; the images are encoded and sent with the request.
- Returns:
tuple[pd.Series, pd.DataFrame | pd.Series] | pd.DataFrame | pd.Series –
(prediction, predict_probability)ifinclude_predictis True, otherwisepredict_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).