Hello everyone,
We have a new user on the platform NarrativeText.co called Lewis Carroll, who has deployed a new notebook called "Building A Linear Regression Model That Predicts Retail Customer Spending"... it is very interesting, here you can find an excerpt:
"We will create a complete project trying to predict customer spending using linear regression with Python.
In this exercise, we have some historical transaction data from 2010 and 2011. For each transaction, we have a customer identifier (CustomerID), the number of units purchased (Quantity), the date of purchase (InvoiceDate) and the unit cost (UnitPrice), as well as some other information about the purchased item.
We want to prepare this data for a regression of 2010 customer transaction data against 2011 expenses. Therefore, we will create features from the 2010 data and calculate the target (the amount of money spent) for 2011.
When we create this model, it should generalize to future years for which we do not yet have the result. Therefore, we could use 2020 data to predict 2021 spending behavior in advance, unless the market or business has changed significantly since the time period to which the data used to fit the model refers:"
Here you can find the dataset and notebook ready to download and learn from it: https://www.narrativetext.co/lewis-vs-data/building-a-linear-regression-model-that-predicts-retail-customer-spending
Hope you enjoy it!