I am analysing the log of a website and I would like to build a classifier to predict the users that are likely to click on an Ad.

The Ad can be displayed to the visitor several times.

To build any classifier I need positive and negative examples:

  • The positives are the visitors who clicked on the Ad (easy).
  • The negatives are the visitors who saw the Ad but didn't click (not very obvious).


  • Is there a convention about how/when to consider a user as a negative example?

I presume that I should define a threshold of impressions (views) per user, if the user reaches this threshold without clicking on the Ad, I consider him/her as as negative example?

Any reference or guidance is highly appreciated.


1 Answer 1


You're overthinking it. You might not need a threshold. Start with the simplest approach you possibly can: If you showed the ad to a visitor, then that's a negative example. Each time you show an ad to a visitor, you end up with an instance, whether positive or negative. If you've showed the ad three times to the same visitor, you end up with three examples. (Maybe all negative; or maybe one is positive and two are negative; but that's fine.)

Bonus tip: Do research methods for handling class imbalance.


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.