source: orange/docs/reference/rst/code/logreg-run.py @ 9372:aef193695ea9

Revision 9372:aef193695ea9, 305 bytes checked in by mitar, 2 years ago (diff)

Moved documentation to the separate directory.

Line 
1from Orange import *
2
3table = data.Table("titanic")
4lr = classification.logreg.LogRegLearner(table)
5
6# compute classification accuracy
7correct = 0.0
8for ex in table:
9    if lr(ex) == ex.getclass():
10        correct += 1
11print "Classification accuracy:", correct / len(table)
12classification.logreg.dump(lr)
Note: See TracBrowser for help on using the repository browser.