Ignore:
Timestamp:
02/05/12 22:37:07 (2 years ago)
Author:
umek@…
Branch:
default
rebase_source:
eb6a120705f3462186b982a698c0a7ad9f947e24
Message:

Changed table to data or name of the data set.

For example - instead of

table = Orange.data.Table("housing")

is changed to

housing = Orange.data.Table("housing")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/logreg-run.py

    r9372 r9638  
    1 from Orange import * 
     1import Orange 
    22 
    3 table = data.Table("titanic") 
    4 lr = classification.logreg.LogRegLearner(table) 
     3titanic = Orange.data.Table("titanic") 
     4lr = Orange.classification.logreg.LogRegLearner(titanic) 
    55 
    66# compute classification accuracy 
    77correct = 0.0 
    8 for ex in table: 
     8for ex in titanic: 
    99    if lr(ex) == ex.getclass(): 
    1010        correct += 1 
    11 print "Classification accuracy:", correct / len(table) 
    12 classification.logreg.dump(lr) 
     11print "Classification accuracy:", correct / len(titanic) 
     12Orange.classification.logreg.dump(lr) 
Note: See TracChangeset for help on using the changeset viewer.