Orange Forum • View topic - Problems using Bagging on 1-nn on arrhythmia

Problems using Bagging on 1-nn on arrhythmia

A place to ask questions about methods in Orange and how they are used and other general support.

Problems using Bagging on 1-nn on arrhythmia

Postby kkonrad » Mon Aug 13, 2012 18:00

Hi,
I have some problem using Orange. When using Bagging with 1-nn I'm getting some error:
s is sample
probs = classifier(s, orange.GetProbabilities)
d = dict(probs.items()) <-- I'm getting error:
TypeError: invalid distribution (no variable)
When I print this probs I get:
<1.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000>
and as I have checked probs.variable was None ...

When doing the same on AdaBoost and 1-nn it works fine.
This affects latest night build and the latest version available in pypi..

BTW when printing samples I also got probability distributions like:
<-0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, -0.000, 1.000, -0.000> but this was on other classifiers

Konrad

Re: Problems using Bagging on 1-nn on arrhythmia

Postby Ales » Thu Aug 16, 2012 11:32

kkonrad wrote:d = dict(probs.items()) <-- I'm getting error:
TypeError: invalid distribution (no variable)

This should now be fixed in our main bitbucket repository (https://bitbucket.org/biolab/orange).

Re: Problems using Bagging on 1-nn on arrhythmia

Postby kkonrad » Fri Aug 17, 2012 11:47

Thanks Ales! Your commits seems to solve my problem! BTW it's good to see that code is getting more PEP8-like


Return to Questions & Support