abacusai.api_class.batch_prediction — AbacusAI documentation

# `abacusai.api_class.batch_prediction`

## Module Contents

### Classes

`BatchPredictionArgs` | Helper class that provides a standard way to create an ABC using
`AnomalyDetectionBatchPredictionArgs` | Batch Prediction Config for the ANOMALY_DETECTION problem type
`AnomalyOutliersBatchPredictionArgs` | Batch Prediction Config for the ANOMALY_OUTLIERS problem type
`ForecastingBatchPredictionArgs` | Batch Prediction Config for the FORECASTING problem type
`NamedEntityExtractionBatchPredictionArgs` | Batch Prediction Config for the NAMED_ENTITY_EXTRACTION problem type
`PersonalizationBatchPredictionArgs` | Batch Prediction Config for the PERSONALIZATION problem type
`PredictiveModelingBatchPredictionArgs` | Batch Prediction Config for the PREDICTIVE_MODELING problem type
`PretrainedModelsBatchPredictionArgs` | Batch Prediction Config for the PRETRAINED_MODELS problem type
`SentenceBoundaryDetectionBatchPredictionArgs` | Batch Prediction Config for the SENTENCE_BOUNDARY_DETECTION problem type
`ThemeAnalysisBatchPredictionArgs` | Batch Prediction Config for the THEME_ANALYSIS problem type
`ChatLLMBatchPredictionArgs` | Batch Prediction Config for the ChatLLM problem type
`_BatchPredictionArgsFactory` | Helper class that provides a standard way to create an ABC using

class abacusai.api_class.batch_prediction.BatchPredictionArgs

  Bases: `abacusai.api_class.abstract.ApiClass`

  Helper class that provides a standard way to create an ABC using inheritance.

  _support_kwargs: bool
  kwargs: dict
  problem_type: abacusai.api_class.enums.ProblemType
  name: str = 'batch_prediction_args'
  classmethod _get_builder()

class abacusai.api_class.batch_prediction.AnomalyDetectionBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the ANOMALY_DETECTION problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param prediction_time_endpoint: The end point for predictions. :type prediction_time_endpoint: str :param prediction_time_range: Over what period of time should we make predictions (in seconds). :type prediction_time_range: int :param minimum_anomaly_score: Exclude results with an anomaly score (1 in x event) below this threshold. Range: [1, 1_000_000_000_000]. :type minimum_anomaly_score: int :param summary_mode: Only show top anomalies per ID. :type summary_mode: bool :param attach_raw_data: Return raw data along with anomalies. :type attach_raw_data: bool :param small_batch: Size of batch data guaranteed to be small. :type small_batch: bool

  for_eval: bool
  prediction_time_endpoint: str
  prediction_time_range: int
  minimum_anomaly_score: int
  summary_mode: bool
  attach_raw_data: bool
  small_batch: bool
  __post_init__()

class abacusai.api_class.batch_prediction.AnomalyOutliersBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the ANOMALY_OUTLIERS problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param threshold: The threshold for detecting an anomaly. Range: [0.8, 0.99] :type threshold: float

  for_eval: bool
  threshold: float
  __post_init__()

class abacusai.api_class.batch_prediction.ForecastingBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the FORECASTING problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation :type for_eval: bool :param predictions_start_date: The start date for predictions. :type predictions_start_date: str :param use_prediction_offset: If True, use prediction offset. :type use_prediction_offset: bool :param start_date_offset: Sets prediction start date as this offset relative to the prediction start date. :type start_date_offset: int :param forecasting_horizon: The number of timestamps to predict in the future. Range: [1, 1000]. :type forecasting_horizon: int :param item_attributes_to_include_in_the_result: List of columns to include in the prediction output. :type item_attributes_to_include_in_the_result: list :param explain_predictions: If True, explain predictions for the forecast. :type explain_predictions: bool

  for_eval: bool
  predictions_start_date: str
  use_prediction_offset: bool
  start_date_offset: int
  forecasting_horizon: int
  item_attributes_to_include_in_the_result: list
  explain_predictions: bool
  __post_init__()

class abacusai.api_class.batch_prediction.NamedEntityExtractionBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the NAMED_ENTITY_EXTRACTION problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param verbose_predictions: Return prediction inputs, predicted annotations and token label probabilities. :type verbose_predictions: bool

  for_eval: bool
  verbose_predictions: bool
  __post_init__()

class abacusai.api_class.batch_prediction.PersonalizationBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the PERSONALIZATION problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param number_of_items: Number of items to recommend. :type number_of_items: int :param result_columns: List of columns to include in the prediction output. :type result_columns: list :param score_field: If specified, relative item scores will be returned using a field with this name :type score_field: str

  for_eval: bool
  number_of_items: int
  item_attributes_to_include_in_the_result: list
  score_field: str
  __post_init__()

class abacusai.api_class.batch_prediction.PredictiveModelingBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the PREDICTIVE_MODELING problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param explainer_type: The type of explainer to use to generate explanations on the batch prediction. :type explainer_type: enums.ExplainerType :param number_of_samples_to_use_for_explainer: Number Of Samples To Use For Kernel Explainer. :type number_of_samples_to_use_for_explainer: int :param include_multi_class_explanations: If True, Includes explanations for all classes in multi-class classification. :type include_multi_class_explanations: bool :param features_considered_constant_for_explanations: Comma separate list of fields to treat as constant in SHAP explanations. :type features_considered_constant_for_explanations: str :param importance_of_records_in_nested_columns: Returns importance of each index in the specified nested column instead of SHAP column explanations. :type importance_of_records_in_nested_columns: str :param explanation_filter_lower_bound: If set explanations will be limited to predictions above this value, Range: [0, 1]. :type explanation_filter_lower_bound: float :param explanation_filter_upper_bound: If set explanations will be limited to predictions below this value, Range: [0, 1]. :type explanation_filter_upper_bound: float :param bound_label: For classification problems specifies the label to which the explanation bounds are applied. :type bound_label: str :param output_columns: A list of column names to include in the prediction result. :type output_columns: list

  for_eval: bool
  explainer_type: abacusai.api_class.enums.ExplainerType
  number_of_samples_to_use_for_explainer: int
  include_multi_class_explanations: bool
  features_considered_constant_for_explanations: str
  importance_of_records_in_nested_columns: str
  explanation_filter_lower_bound: float
  explanation_filter_upper_bound: float
  explanation_filter_label: str
  output_columns: list
  __post_init__()

class abacusai.api_class.batch_prediction.PretrainedModelsBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the PRETRAINED_MODELS problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param files_output_location_prefix: The output location prefix for the files. :type files_output_location_prefix: str :param channel_id_to_label_map: JSON string for the map from channel ids to their labels. :type channel_id_to_label_map: str

  for_eval: bool
  files_output_location_prefix: str
  channel_id_to_label_map: str
  __post_init__()

class abacusai.api_class.batch_prediction.SentenceBoundaryDetectionBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the SENTENCE_BOUNDARY_DETECTION problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation :type for_eval: bool :param explode_output: Explode data so there is one sentence per row. :type explode_output: bool

  for_eval: bool
  explode_output: bool
  __post_init__()

class abacusai.api_class.batch_prediction.ThemeAnalysisBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the THEME_ANALYSIS problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param analysis_frequency: The length of each analysis interval. :type analysis_frequency: str :param start_date: The end point for predictions. :type start_date: str :param analysis_days: How many days to analyze. :type analysis_days: int

  for_eval: bool
  analysis_frequency: str
  start_date: str
  analysis_days: int
  __post_init__()

class abacusai.api_class.batch_prediction.ChatLLMBatchPredictionArgs

  Bases: `BatchPredictionArgs`

  Batch Prediction Config for the ChatLLM problem type :param for_eval: If True, the test fold which was created during training and used for metrics calculation will be used as input data. These predictions are hence, used for model evaluation. :type for_eval: bool :param product: Generate a response for every question and chunk combination :type product: bool

  for_eval: bool
  product: bool
  __post_init__()

class abacusai.api_class.batch_prediction._BatchPredictionArgsFactory

  Bases: `abacusai.api_class.abstract._ApiClassFactory`

  Helper class that provides a standard way to create an ABC using inheritance.

  config_abstract_class
  config_class_key = 'problemType'
  config_class_map