Ignore:
Timestamp:
02/06/12 20:01:02 (2 years ago)
Author:
lanumek
Branch:
default
Children:
9835:e48466fc6eb2, 9841:05a160804431
rebase_source:
8cf30121654f25c9cb6d8ac9bdaf163e305d62da
Message:

Changed names of data sets (table replaced with data or name of the data set).

File:
1 edited

Legend:

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

    r9372 r9823  
    77import Orange 
    88 
    9 table = Orange.data.Table("monks-1") 
     9monks = Orange.data.Table("monks-1") 
    1010 
    11 a, b, e = table.domain["a"], table.domain["b"], table.domain["e"] 
     11a, b, e = monks.domain["a"], monks.domain["b"], monks.domain["e"] 
    1212 
    1313ab = Orange.data.variable.Discrete("a==b", values = ["no", "yes"]) 
     
    1919                    ["yes", "no", "no", "no", "?"]) 
    2020 
    21 table2 = table.select([a, b, ab, e, e1, table.domain.class_var]) 
     21monks2 = monks.select([a, b, ab, e, e1, monks.domain.class_var]) 
    2222 
    2323for i in range(5): 
    24     print table2.random_example() 
     24    print monks2.random_example() 
    2525 
    2626for i in range(5): 
    27     ex = table.random_example() 
     27    ex = monks.random_example() 
    2828    print "%s: ab %i, e1 %i " % (ex, ab.get_value_from.get_index(ex), 
    2929                                 e1.get_value_from.get_index(ex)) 
Note: See TracChangeset for help on using the changeset viewer.