Changeset 7315:3c2c0b4b1cff in orange


Ignore:
Timestamp:
02/03/11 12:35:02 (3 years ago)
Author:
lanz <lan.zagar@…>
Branch:
default
Convert:
dfd0cfc3d55dc9f7239cb35e48f7f3285e2c826d
Message:

Code updated to new hierarchy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/doc/Orange/rst/code/lookup-classifier.py

    r7301 r7315  
    22# Category:    classification, lookup classifiers, constructive induction, feature construction 
    33# Classes:     ClassifierByLookupTable, ClassifierByLookupTable1, ClassifierByLookupTable2, ClassifierByLookupTable3 
    4 # Uses:        monk1 
     4# Uses:        monks-1 
    55# Referenced:  lookup.htm 
    66 
    7 import orange 
     7import Orange 
    88 
    9 data = orange.ExampleTable("monk1") 
     9data = Orange.data.Table("monks-1") 
    1010 
    1111a, b, e = data.domain["a"], data.domain["b"], data.domain["e"] 
    1212 
    13 ab = orange.EnumVariable("a==b", values = ["no", "yes"]) 
    14 ab.getValueFrom = orange.ClassifierByLookupTable(ab, a, b, 
     13ab = Orange.data.feature.Discrete("a==b", values = ["no", "yes"]) 
     14ab.getValueFrom = Orange.classification.lookup.ClassifierByLookupTable(ab, a, b, 
    1515                    ["yes", "no", "no",  "no", "yes", "no",  "no", "no", "yes"]) 
    1616 
    17 e1 = orange.EnumVariable("e==1", values = ["no", "yes"]) 
    18 e1.getValueFrom = orange.ClassifierByLookupTable(e1, e, 
     17e1 = Orange.data.feature.Discrete("e==1", values = ["no", "yes"]) 
     18e1.getValueFrom = Orange.classification.lookup.ClassifierByLookupTable(e1, e, 
    1919                    ["yes", "no", "no", "no", "?"]) 
    2020 
Note: See TracChangeset for help on using the changeset viewer.