generate_unsaturated_data#
- pymc_marketing.customer_choice.synthetic_data.generate_unsaturated_data(total_sales_before, total_sales_after, total_sales_sigma, treatment_time, n_observations, market_shares_before, market_shares_after, market_share_labels, random_seed=None)[source]#
Generate synthetic data for the MVITS model.
Notably, we can define different total sales levels before and after the introduction of the new model.
This function generates synthetic data for the MVITS model, assuming that the market is unsaturated meaning that there are new sales to be made.
This makes the assumption that the total sales are normally distributed around some average level of sales, and that the market shares are constant over time.
- Parameters:
- total_sales_mu: int
The average level of sales in the market.
- total_sales_sigma: float
The standard deviation of sales in the market.
- treatment_time: int
The time at which the new model is introduced.
- n_observations: int
The number of observations to generate.
- market_shares_before: list[float]
The market shares before the introduction of the new model.
- market_shares_after: list[float]
The market shares after the introduction of the new model.
- market_share_labels: list[str]
The labels for the market shares.
- random_seed: np.random.Generator | int, optional
The random number generator to use.
- Returns:
- data:
pd.DataFrame
The synthetic data generated.
- data: