Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only One class present issue #7

Closed
joohyelim opened this issue Mar 9, 2020 · 1 comment
Closed

Only One class present issue #7

joohyelim opened this issue Mar 9, 2020 · 1 comment

Comments

@joohyelim
Copy link

I am working on my own data -purchase history of financial production.
So I have data as who, with features, purchased which products, with features and when.
However, I have found that the metric of the model is AUC -- and I, as expected, get the following error

ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.

Since all my Ys are 1s -as I only have who purchased (clicked) which and there is no 0 value ( who didn't purchase which).
As other CTR prediction models also use AUC and log loss, I assume that there must be a way to use AUC for such a dataset.

Do you have any idea how to solve this issue?
That would be really helpful!

@Songweiping
Copy link
Contributor

For any classification problem, we need more than one class. In your case, IIUIC, the collected data only contains positive examples, i.e., clicks. To evaluate the model, you need to construct negative samples by combining a user with some items that he/she didn't click, forming zero Ys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants