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

All predictions are the same #3

Closed
zygmuntz opened this issue Mar 1, 2016 · 2 comments
Closed

All predictions are the same #3

zygmuntz opened this issue Mar 1, 2016 · 2 comments

Comments

@zygmuntz
Copy link

zygmuntz commented Mar 1, 2016

When I run the hepatitis demo, I get a nice list of rules:

Trained RuleListClassifier for detecting survival
==================================================
IF ALBUMIN : -inf_to_2.65 THEN probability of survival: 87.5% (59.0%-99.6%)
ELSE IF BILIRUBIN : 1.41375838926_to_inf THEN probability of survival: 36.8% (22.5%-52.5%)

ELSE IF ALBUMIN : 3.85863309352_to_inf THEN probability of survival: 3.6% (0.4%-9.7%)
ELSE probability of survival: 18.2% (5.4%-36.3%)
=================================================

Reported accuracy is 76.9% and this is correct, but all predictions are the same:

array([[ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818],
       [ 0.81818182,  0.18181818]])

Similarly, when I run on my dataset, there's a nice list of rules, but all predictions are the same (0).

@tmadl
Copy link
Owner

tmadl commented Mar 1, 2016

Hi, I can't reproduce this error. clf.predict_proba(Xtest) gives some decent probabilities on my end (see below). Can you let me know what exactly you did to produce your predictions, and send me your version of scikit-learn?

[[ 0.68181818 0.31818182] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.68181818 0.31818182] [ 0.38235294 0.61764706] [ 0.38235294 0.61764706] [ 0.96774194 0.03225806] [ 0.68181818 0.31818182] [ 0.96774194 0.03225806] [ 0.38235294 0.61764706] [ 0.68181818 0.31818182] [ 0.68181818 0.31818182] [ 0.96774194 0.03225806] [ 0.68181818 0.31818182] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.38235294 0.61764706] [ 0.38235294 0.61764706] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.38235294 0.61764706] [ 0.96774194 0.03225806] [ 0.68181818 0.31818182] [ 0.38235294 0.61764706] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806] [ 0.68181818 0.31818182] [ 0.68181818 0.31818182] [ 0.96774194 0.03225806] [ 0.96774194 0.03225806]]

@tmadl
Copy link
Owner

tmadl commented Mar 2, 2016

I did a fresh install of up-to-date libraries on both Ubuntu and Windows 7 and still cannot reproduce the error.

@tmadl tmadl closed this as completed Mar 2, 2016
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