# Classify future performance of customer

I have a dataset with monthly revenue per customer. I want to build a model that can try to predict if the customer will exceed \$10,000 3 months out (yes/no).

While this seems like a traditional ML problem I have an important questions

1. Should I build my dataset with one row per customer id and let the label be the revenue 3 months out
2. Should I instead have one row per month per customer and let the label by the revenue 3 months out

Thanks

• Group by sum for each customer for 3 months and then have a binary classification over or under 3 months?? – i.n.n.m Dec 14 '17 at 20:26

I'm not sure it will matter very much whether you have one row per user or if you have one row for per month per user. The important part is that the data you have is accurate for that user for a particular month. You might construct your training data like this:

--------|-----------------|--------------------|
cust. id| time on website | profit over 10,000?|
--------|-----------------|--------------------|
3         30               0
--------|-----------------|--------------------|
3         80               1
--------|-----------------|--------------------|
5         100              1
--------|-----------------|--------------------|
7         5                0
--------|-----------------|--------------------|


The important thing to notice is that even though customer 3 is in the dataset more than once, he/she has different values for their data features on which to predict, and different from how they were represented in the previous month. This is assuming that you are aggregating the data by month per customer.

This blog predicts customer churn, but you might be able to use the general strategy for your problem.

• Thanks for that! I've thought a bit more about it and it seems that there are a few subtle differences. If I do one row per account and put say each month of previous revenue in different columns I will be be able to predict given the current performance. On the other hand, if I have one row per month per account the model should be able to learn that sales is higher in december etc – user3642173 Dec 15 '17 at 9:59