## Probability of a prediction with orangeLR

3 posts
• Page

**1**of**1**### Probability of a prediction with orangeLR

If I predict a value using orangeLR.LogRegLearner I get immediately the predicted class. If the LogReg-Value is close to 0.5 I want to know this, since then I could print out the information.

So how can I get the result of the calculation prior to assigning the predicted class?

So how can I get the result of the calculation prior to assigning the predicted class?

- Code: Select all

In [68]: n = orange.ExampleTable(newdomain, data)

In [69]: classifier = orngLR.LogRegLearner(n)

In [70]: for (i, e) in enumerate(n):

....: print i, classifier(e, orange.GetBoth)

....:

....:

0 (<orange.Value 'category'='positive'>, <0.700, 0.300>)

1 (<orange.Value 'category'='positive'>, <0.502, 0.498>)

2 (<orange.Value 'category'='positive'>, <0.589, 0.411>)

3 (<orange.Value 'category'='positive'>, <0.553, 0.447>)

4 (<orange.Value 'category'='positive'>, <0.601, 0.399>)

5 (<orange.Value 'category'='positive'>, <0.654, 0.346>)

6 (<orange.Value 'category'='positive'>, <0.521, 0.479>)

7 (<orange.Value 'category'='control'>, <0.358, 0.642>)

8 (<orange.Value 'category'='control'>, <0.395, 0.605>)

9 (<orange.Value 'category'='control'>, <0.332, 0.668>)

.

.

.

.

3 posts
• Page

**1**of**1**