Here, we will cover how to model price elasticity using an example sales data. The aim is to calculate the price elasticity of each product separately using a Linear Regression. The data has been taken from Kaggle courtesy of Assert Solutions.
The below workflow:
- Creates a loop to create models for each Product Code
- Filters the data based on the number of records for each Product Code
- Assembles features for modelling
- Builds a linear regression model to find price elasticity
- Filters model results to remove unnecessary data
- Saves the model results to CSV
For more details, see the tutorial: Data Modelling - Price Elasticity — Sparkflows 3.0 documentation