I want to predict the price of the next item a user purchases based on the prices of the items they have purchased in the past. The caveat is that most users have less than 3 previous purchases, so I am wondering what would be a good approach for predicting a purchase when the historical data is so sparse?
-
$\begingroup$ Are the products all the same type? E.g. are people bidding on cars in an auction and you want to say what is the price that Bob is likely to pay for his next car? $\endgroup$– user64106Commented Feb 13, 2018 at 11:37
-
$\begingroup$ They can be different things but I only have previous purchase amounts, not what the objects are. $\endgroup$– anthonybellCommented Feb 13, 2018 at 18:58
2 Answers
I would use a multiple regression with the following variables:
- $y_{i,j}$, the price paid by person-profile $i$ for good $j$
- $x_j$, a categorical variable for the product category (e.g. car, motorbike, boat etc.)
- $c_i$, a categorical variable of customers after they have been clustered based on their purchasing habits
The model becomes $\hat{y}_{i,j} = \beta_0+\beta_1 x_j + \beta_2 c_i$.
Controlling for the product is easy to explain: different product naturally hold different values (compare a house to a doll house).
Clustering the customers addresses the sample size somewhat. I.e. you now have larger, homogenous groups of customers. These will need to represent customer's price sensitivity (high, medium, low).
-
$\begingroup$ @anthonybell: If the answer was useful to you, please upvote and/or accept. $\endgroup$– user64106Commented Feb 19, 2018 at 10:06
-
$\begingroup$ A collaborative filtering solution makes sense, I'll give it a try. thanks! $\endgroup$ Commented Feb 27, 2018 at 21:42
EDIT. I just finished a book on time series analysis so i am updating this with the best found answer.
The main class of models for doing time series modeling are called auto-regressive (AR)
models. The most commonly used are ARIMA
models (Auto-Regressive Integrated Moving Average
) which also incorporate noise terms.
These models are of the form:
$$f(x_t) = \alpha_1 x_{t-1} + ... + \alpha_p x_{t-p} + w_t + b_1 w_{t-1} + ... + b_q*w_{t-q}$$
Where the $w_{i}$'s are noise values, the $x_{i}$'s are previously seen values in the sequence.
The constants of the model would be learned by minimizing the error between the predicted value of the model and the observed value:
$ \alpha_1,..,\alpha_p,\beta_1,..,\beta_q = \text{argmin}_{\alpha_1',..,\alpha_p',\beta_1',..,\beta_q'} \sum_{i=1}^{N}\sum_{t=max(p,q)}^T (x^{(i)}_t - f(x^{(i)}_t))^2 $