# Constants (`consts.py`) This module defines various string constants used throughout the ABACUS library, particularly in configuration files, data structures, and function arguments. Using these constants helps ensure consistency and avoids typos. ## Dictionary Keys - `KEY_GRANULARITY = "granularity"`: Key used in configuration or data dictionaries to specify time granularity. - `KEY_DATE_STRS = "date_strs"`: Key for date string arrays/lists. - `KEY_METRICS = "metrics"`: Key related to metric data. - `KEY_OBSERVATIONS = "observations"`: Key related to observation data. ## Time Granularity Constants representing the time granularity of the input data. - `GRANULARITY_DAILY = "daily"`: Indicates daily time series data. - `GRANULARITY_WEEKLY = "weekly"`: Indicates weekly time series data. ## Model/Transformation Names (Legacy/Reference) These constants might refer to specific model types or transformations, potentially from earlier versions or related libraries. - `FIT_abacus_MMM_MODELNAME_HILL_ADSTOCK = "hill_adstock"` - `FIT_abacus_MMM_MODELNAME_ADSTOCK = "adstock"` - `FIT_abacus_MMM_MODELNAME_CARRYOVER = "carryover"` ## Outlier Removal Types Constants specifying methods for handling outliers, likely used in preprocessing functions (e.g., `abacus.prepro.outliers`). - `REMOVE_OUTLIERS_TYPE_REPLACE_WITH_TRIMMED_MEAN = "replace_with_trimmed_mean"`: Replace outliers with the trimmed mean of the non-outlier values. - `REMOVE_OUTLIERS_TYPE_REPLACE_WITH_P10_VALUE = "replace_with_p10_value"`: Replace outliers with the 10th percentile value. ## DataFrame Column Suffixes Standard suffixes used when creating column names in pandas DataFrames generated by ABACUS functions (e.g., in `DataToFit.to_data_frame`). - `DATA_FRAME_COST_SUFFIX = "cost"`: Suffix for columns representing cost data. - `DATA_FRAME_IMPRESSIONS_SUFFIX = "impressions"`: Suffix for columns representing impression or spend data (often used interchangeably in MMM contexts).