TimeSeriesCloudPredictor.predict_proba#

TimeSeriesCloudPredictor.predict_proba(**kwargs) Optional[DataFrame][source]#

Batch inference When minimizing latency isn’t a concern, then the batch transform functionality may be easier, more scalable, and more appropriate. If you want to minimize latency, use predict_real_time() instead.

Parameters
  • test_data (Union(str, pandas.DataFrame)) – The test data to be inferenced. Can be a pandas.DataFrame, or a local path to a csv.

  • test_data_image_column (str, default = None) – If test_data involves image modality, you must specify the column name corresponding to image paths. The path MUST be an abspath

  • include_predict (bool, default = True) – Whether to include predict result along with predict_proba results. This flag can save you time from making two calls to get both the prediction and the probability as batch inference involves noticeable overhead.

  • predictor_path (str) – Path to the predictor tarball you want to use to predict. Path can be both a local path or a S3 location. If None, will use the most recent trained predictor trained with fit().

  • framework_version (str, default = latest) – Inference container version of autogluon. If latest, will use the latest available container version. If provided a specific version, will use this version. If custom_image_uri is set, this argument will be ignored.

  • job_name (str, default = None) – Name of the launched training job. If None, CloudPredictor will create one with prefix ag-cloudpredictor.

  • instance_count (int, default = 1,) – Number of instances used to do batch transform.

  • instance_type (str, default = 'ml.m5.2xlarge') – Instance to be used for batch transform.

  • wait (bool, default = True) – Whether to wait for batch transform to complete. To be noticed, the function won’t return immediately because there are some preparations needed prior transform.

  • backend_kwargs (dict, default = None) –

    Any extra arguments needed to pass to the underneath backend. For SageMaker backend, valid keys are:

    1. download: bool, default = True

      Whether to download the batch transform results to the disk and load it after the batch transform finishes. Will be ignored if wait is False.

    2. persist: bool, default = True

      Whether to persist the downloaded batch transform results on the disk. Will be ignored if download is False

    3. save_path: str, default = None,

      Path to save the downloaded result. Will be ignored if download is False. If None, CloudPredictor will create one. If persist is False, file would first be downloaded to this path and then removed.

    4. model_kwargs: dict, default = dict()

      Any extra arguments needed to initialize Sagemaker Model Please refer to https://sagemaker.readthedocs.io/en/stable/api/inference/model.html#model for all options

    5. transformer_kwargs: dict

      Any extra arguments needed to pass to transformer. Please refer to https://sagemaker.readthedocs.io/en/stable/api/inference/transformer.html#sagemaker.transformer.Transformer for all options.

    6. transform_kwargs:

      Any extra arguments needed to pass to transform. Please refer to https://sagemaker.readthedocs.io/en/stable/api/inference/transformer.html#sagemaker.transformer.Transformer.transform for all options.

Returns

If download is False, will return None or (None, None) if include_predict is True If download is True and include_predict is True, will return (prediction, predict_probability), where prediction is a Pandas.Series and predict_probability is a Pandas.DataFrame or a Pandas.Series that’s identical to prediction when it’s a regression problem.

Return type

Optional[Union[Tuple[pd.Series, Union[pd.DataFrame, pd.Series]], Union[pd.DataFrame, pd.Series]]]