8080labs / ppscore

Predictive Power Score (PPS) in Python
MIT License
1.12k stars 168 forks source link

warning message #1

Open reza1615 opened 4 years ago

reza1615 commented 4 years ago

It shows this warning. I attached the csv file

The least populated class in y has only 1 members, which is less than n_splits=4.

C:\Users....\sklearn\model_selection_split.py:667: UserWarning:

for_test.txt

8080labs commented 4 years ago

You can usually ignore the warning. It is just a reminder for you that there are some values in the target column that are impossible to be predicted.

The warning comes from sklearn and tells you that some observations in the target are less than the number of splits. That means that those members of the target variable won't be able to be predicted during crossvalidation which is fine because they are so rare anyway ...

reza1615 commented 4 years ago

Is it possible to handle it inside your code? one time seeing this warning is ok. now it spams :D

8080labs commented 4 years ago

We will have a look into it.

In the meantime, you can also suppress the warnings yourself: https://stackoverflow.com/questions/32612180/eliminating-warnings-from-scikit-learn

ibuda commented 4 years ago

@reza1615 disregarding the warning messages, are you getting the same results like the ones in the article? I am getting different values for the Titanic dataset, issue #4 and getting the same warning message as you do.