1
$\begingroup$

My goal is to build a classification model in order to predict if a customer will buy a product or not (binary classification).

Since in the last months (let's say 3-4) I know that the advertising of the company is changed a bit, I want to put more emphasis on the newer records.

I know that it is possible to specify the sample_weights parameter in most of the classification algorithms, but I don't know how to properly build these weights.

Basically, I have the date in which the customers have (or have not) bought the product, but I want to understand if there is a specific way to build the weights using this information.

In addition, I would also know if someone knows some references or applications for this application (time-related sampling weights).

Thank you in advance!

$\endgroup$
  • $\begingroup$ Have you heard about adversarial validation? kaggle.com/tunguz/elo-adversarial-validation It basically implies training a model that helps you classify between training and testing samples. I think you could apply that to your problem, and use the predictions of the adversarial model that predicts last months vs older data as the weights of your samples $\endgroup$ – David Masip Jul 31 at 10:32
  • 1
    $\begingroup$ Not sure what is the best solution here, nonetheless, a thing for you to have in mind is that you can also oversample the more recent instances or inversely downsample the older ones, you get the idea. For some algorithms, this works better than setting weights, or maybe it's not even possible. $\endgroup$ – Grzegorz Jul 31 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.