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/variable-get_value_from.py

    r9372 r9823  
    1313        return e2("not 1")  
    1414 
    15 data = Orange.data.Table("monks-1") 
     15monks = Orange.data.Table("monks-1") 
    1616e2 = Orange.data.variable.Discrete("e2", values=["not 1", "1"])     
    1717e2.get_value_from = checkE  
    1818 
    19 print Orange.core.MeasureAttribute_info(e2, data) 
     19print Orange.core.MeasureAttribute_info(e2, monks) 
    2020 
    21 dist = Orange.core.Distribution(e2, data) 
     21dist = Orange.core.Distribution(e2, monks) 
    2222print dist  
    2323 
    2424# Split the data into training and testing set 
    25 indices = Orange.core.MakeRandomIndices2(data, p0=0.7) 
    26 train_data = data.select(indices, 0) 
    27 test_data = data.select(indices, 1) 
     25indices = Orange.core.MakeRandomIndices2(monks, p0=0.7) 
     26train_data = monks.select(indices, 0) 
     27test_data = monks.select(indices, 1) 
    2828 
    2929# Convert the training set to a new domain 
    30 new_domain = Orange.data.Domain([data.domain["a"], data.domain["b"], e2, data.domain.class_var]) 
     30new_domain = Orange.data.Domain([monks.domain["a"], monks.domain["b"], e2, monks.domain.class_var]) 
    3131new_train = Orange.data.Table(new_domain, train_data) 
    3232 
Note: See TracChangeset for help on using the changeset viewer.