2
$\begingroup$

I'm using supervised learning on monthly activity data to predict when a customer buys a particular product. This product is typically bought infrequently and at the moment my target variable is whether the customer buys the product in the next twelve months.

Assume that for every customer I get a set of features every month, $x_1,x_2,\ldots,x_n$. The goal is to use these features to predict whether $y=0$ or $y=1$ ($y$ is 1 if the customer did buy the product in the next twelve months, otherwise it is zero).

However, this creates a dilemma. If I use this approach for $y$ then my freshest training data is twelve months old as I do not know the true value for $y$ for data that is newer than twelve months old. My main question is thus the following: Is there a way for me to make use of newer data in this setting?

Also, I should note that I have tried changing $y$ into: "Does the customer buy the product in the next month?". It works but not nearly as well as the other approach. My data is imbalanced so by allowing the target period to be composed of the following twelve months instead of a single month I get many more positive data points.

$\endgroup$

1 Answer 1

1
$\begingroup$

To summarize assumptions:

1) You are working with time-series data $\mathbf{X}$, (or aggregation of features over a time-domain, there is a temporal component). Let's assume that you have $N$ samples and $p$ features.

2) You are trying to predict rare-events, $\mathbf{y}$, formalizing as a classification problem means that it is imbalanced, as you state.

3) The time window defining the $\mathbf{y}$ is too long, making it hard to use new data, which cannot have a label by definition of $\mathbf{y}$.

And the questions is, how can we use the fresh data?

There are too many unknowns, and we also do not know what modeling approach you are using, e.g. does the model take the time dimension into account or not. Generally speaking, what you are trying to achieve sounds like a semi-supervised problem. You want to include unlabelled data to make the predictions/classification better.

This can work, but it is also very hard to get it right. What makes this even harder is that you are working with imbalanced data. All semi-supervised approaches make some vague distributional assumptions about the data, e.g. density or clustering based, which are in essence equivalent. Also, since there is a time-component in the data, you will likely break the assumption that the clusters representing the data are fixed, i.e. you will most likely have some effect of covariate shift.

I don't think there is any magic solution to your problem, but the following might point you to a direction to improve what you have.

What can help is to try to break the problem into more classes, e.g. the 0 class, are there any other events that could happen, where they were almost become a 1, but this extra unknown event happened, so they remain a 0...?

I.e. Is there a possibility to:

A) Get more data, more samples, more potentially good covariates, more fine grained classes, instead of a binary label?

B) Revisit the modeling and problem formulation, you said you tried to predict for next month, what about next quarter or half year?

C) Include domain knowledge, is there any theory on the relationships between these events, can you validate the data on the theory?

$\endgroup$
1
  • $\begingroup$ Regarding A) it's not possible to get more records, more features is possible. Regarding B) when predicting for a period longer than one month the original problem still persists. Hence I don't see how that would solve the problem, only mitigate it. Regarding C) there is no theory that I am aware of. $\endgroup$
    – Haffi112
    Commented Jul 10, 2019 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.