Changeset 10031:3113e6606c8f in orange


Ignore:
Timestamp:
02/08/12 00:09:37 (2 years ago)
Author:
tomazc <tomaz.curk@…>
Branch:
default
Message:

Documentation and porting of Orange.data.filter.

Files:
2 added
5 edited
4 copied

Legend:

Unmodified
Added
Removed
  • Orange/__init__.py

    r9698 r10031  
    2020_import("data.sample") 
    2121_import("data.variable") 
     22_import("data.filter") 
    2223 
    2324_import("network") 
  • Orange/fixes/fix_changed_names.py

    r9860 r10031  
    521521           "orange.ProbabilityEstimatorList": "Orange.statistics.estimate.ProbabilityEstimatorList", 
    522522 
    523            "orange.FilterList": "Orange.preprocess.FilterList", 
    524            "orange.Filter": "Orange.preprocess.Filter", 
    525            "orange.Filter_conjunction": "Orange.preprocess.Filter_conjunction", 
    526            "orange.Filter_disjunction": "Orange.preprocess.Filter_disjunction", 
    527            "orange.Filter_hasClassValue": "Orange.preprocess.Filter_hasClassValue", 
    528            "orange.Filter_hasMeta": "Orange.preprocess.Filter_hasMeta", 
    529            "orange.Filter_hasSpecial": "Orange.preprocess.Filter_hasSpecial", 
    530            "orange.Filter_isDefined": "Orange.preprocess.Filter_isDefined", 
    531            "orange.Filter_random": "Orange.preprocess.Filter_random", 
    532            "orange.Filter_sameValue": "Orange.preprocess.Filter_sameValue", 
    533            "orange.Filter_values": "Orange.preprocess.Filter_values", 
     523           "orange.FilterList": "Orange.data.filter.FilterList", 
     524           "orange.Filter": "Orange.data.filter.Filter", 
     525           "orange.Filter_conjunction": "Orange.data.filter.Conjunction", 
     526           "orange.Filter_disjunction": "Orange.data.filter.Disjunction", 
     527           "orange.Filter_hasClassValue": "Orange.data.filter.HasClassValue", 
     528           "orange.Filter_hasMeta": "Orange.data.filter.HasMeta", 
     529           "orange.Filter_hasSpecial": "Orange.data.filter.HasSpecial", 
     530           "orange.Filter_isDefined": "Orange.data.filter.IsDefined", 
     531           "orange.Filter_random": "Orange.data.filter.Random", 
     532           "orange.Filter_sameValue": "Orange.data.filter.SameValue", 
     533           "orange.Filter_values": "Orange.data.filter.Values", 
     534           "orange.ValueFilter": "Orange.data.filter.ValueFilter", 
     535           "orange.ValueFilterList": "Orange.data.filter.ValueFilterList", 
     536           "orange.ValueFilter_discrete": "Orange.data.filter.ValueFilterDiscrete", 
     537           "orange.ValueFilter_continuous": "Orange.data.filter.ValueFilterContinuous", 
     538           "orange.ValueFilter_string": "Orange.data.filter.ValueFilterString", 
    534539 
    535540           # orngEnviron 
  • docs/reference/rst/Orange.data.rst

    r9901 r10031  
    1010    Orange.data.table 
    1111    Orange.data.sample 
     12    Orange.data.filter 
    1213    Orange.data.formats 
    1314    Orange.data.discretization 
  • docs/reference/rst/Orange.feature.imputation.rst

    r9905 r10031  
    2525 
    2626Imputers 
    27 ----------------- 
     27-------- 
    2828 
    2929:obj:`ImputerConstructor` is the abstract root in a hierarchy of classes 
  • docs/reference/rst/code/filter.py

    r9671 r10031  
    1 # Description: Shows how to filter examples using various classes derived from orange.Filter 
    2 # Category:    filtering, preprocessing 
    3 # Classes:     Filter, Filter_random, Filter_hasSpecial, Filter_hasClassValue, Filter_sameValue, Filter_values 
     1# Description: Shows how to filter examples using various classes derived from Orange.data.filter.Filter 
     2# Category:    filtering 
     3# Classes:     Filter, Random, HasSpecial, HasClassValue, SameValue, Values, ValueFilterDiscrete, ValueFilterContinuous, ValueFilterString 
    44# Uses:        lenses 
    55# Referenced:  filters.htm 
    66 
    7 import orange 
     7import Orange 
    88 
    9 data = orange.ExampleTable("lenses") 
     9data = Orange.data.Table("lenses") 
     10instance = data[0] 
    1011 
    11 example = data[0] 
    12  
    13 randomfilter = orange.Filter_random(prob = 0.7, randomGenerator = 24) 
     12randomfilter = Orange.data.filter.Random(prob = 0.7, randomGenerator = 24) 
    1413for i in range(10): 
    15     print randomfilter(example), 
     14    print randomfilter(instance), 
    1615print 
    1716 
     
    2221data2[0]["age"] = "?" 
    2322data2[1].setclass("?") 
    24 print "First five examples" 
     23print "First five intances" 
    2524for ex in data2: 
    2625    print ex 
    2726 
    28 print "\nExamples without unknown values" 
    29 f = orange.Filter_isDefined(domain = data.domain) 
     27print "\nInstances without unknown values" 
     28f = Orange.data.filter.IsDefined(domain = data.domain) 
    3029for ex in f(data2): 
    3130    print ex 
    3231 
    33 print "\nExamples without unknown values, ignoring 'age'" 
     32print "\nInstances without unknown values, ignoring 'age'" 
    3433f.check["age"] = 0 
    3534for ex in f(data2): 
    3635    print ex 
    3736 
    38 print "\nExamples with unknown values (ignoring age)" 
     37print "\nInstances with unknown values (ignoring age)" 
    3938for ex in f(data2, negate=1): 
    4039    print ex 
    4140 
    42  
    43 print "\nExamples with unknown values (Filter_hasSpecial)" 
    44 for ex in orange.Filter_hasSpecial(data2): 
     41print "\nInstances with unknown values (HasSpecial)" 
     42for ex in Orange.data.filter.HasSpecial(data2): 
    4543    print ex 
    4644 
    47 print "\nExamples with no unknown values (Filter_hasSpecial)" 
    48 for ex in orange.Filter_hasSpecial(data2, negate=1): 
     45print "\nInstances with no unknown values (HasSpecial)" 
     46for ex in Orange.data.filter.HasSpecial(data2, negate=1): 
    4947    print ex 
    5048 
    51 print "\nExamples with defined class" 
    52 for ex in orange.Filter_hasClassValue(data2): 
     49print "\nInstances with defined class (HasClassValue)" 
     50for ex in Orange.data.filter.HasClassValue(data2): 
    5351    print ex 
    5452 
    55 print "\nExamples with undefined class" 
    56 for ex in orange.Filter_hasClassValue(data2, negate=1): 
     53print "\nInstances with undefined class (HasClassValue)" 
     54for ex in Orange.data.filter.HasClassValue(data2, negate=1): 
    5755    print ex 
    5856 
    5957 
    60 filteryoung = orange.Filter_sameValue() 
     58filteryoung = Orange.data.filter.SameValue() 
    6159age = data.domain["age"] 
    62 filteryoung.value = orange.Value(age, "young") 
     60filteryoung.value = Orange.data.Value(age, "young") 
    6361filteryoung.position = data.domain.attributes.index(age) 
    64 print "\nYoung examples" 
     62print "\nYoung instances" 
    6563for ex in filteryoung(data): 
    6664    print ex 
     
    6866 
    6967print "\nYoung or presbyopic with astigmatism" 
    70 fya = orange.Filter_values() 
     68fya = Orange.data.filter.Values() 
    7169age, astigm = data.domain["age"], data.domain["astigmatic"] 
    7270fya.domain = data.domain 
    73 fya.conditions.append(orange.ValueFilter_discrete(position = data.domain.attributes.index(age), values=[orange.Value(age, "young"), orange.Value(age, "presbyopic")])) 
    74 fya.conditions.append(orange.ValueFilter_discrete(position = data.domain.attributes.index(astigm), values=[orange.Value(astigm, "yes")])) 
     71fya.conditions.append( 
     72    Orange.data.filter.ValueFilterDiscrete( 
     73        position=data.domain.attributes.index(age), 
     74        values=[Orange.data.Value(age, "young"), 
     75                Orange.data.Value(age, "presbyopic")]) 
     76) 
     77fya.conditions.append( 
     78    Orange.data.filter.ValueFilterDiscrete( 
     79        position = data.domain.attributes.index(astigm), 
     80        values=[Orange.data.Value(astigm, "yes")])) 
    7581for ex in fya(data): 
    7682    print ex 
    7783 
    7884print "\nYoung or presbyopic with astigmatism" 
    79 fya = orange.Filter_values(domain = data.domain, 
    80                            conditions = [orange.ValueFilter_discrete(position = data.domain.attributes.index(age), values=[orange.Value(age, "young"), orange.Value(age, "presbyopic")]), 
    81                                          orange.ValueFilter_discrete(position = data.domain.attributes.index(astigm), values=[orange.Value(astigm, "yes")]) 
    82                                         ] 
    83                           ) 
     85fya = Orange.data.filter.Values(domain=data.domain, conditions= 
     86    [ 
     87    Orange.data.filter.ValueFilterDiscrete( 
     88        position=data.domain.attributes.index(age), 
     89        values=[Orange.data.Value(age, "young"), 
     90                Orange.data.Value(age, "presbyopic")]), 
     91    Orange.data.filter.ValueFilterDiscrete( 
     92        position=data.domain.attributes.index(astigm), 
     93        values=[Orange.data.Value(astigm, "yes")]) 
     94    ]) 
    8495for ex in fya(data): 
    8596    print ex 
     
    8798 
    8899print "\nYoung or presbyopic with astigmatism" 
    89 fya = orange.Filter_values(domain = data.domain, 
    90                            conditions = [orange.ValueFilter_discrete(position = data.domain.attributes.index(age), values=[orange.Value(age, "young"), orange.Value(age, "presbyopic")], acceptSpecial = 0), 
    91                                          orange.ValueFilter_discrete(position = data.domain.attributes.index(astigm), values=[orange.Value(astigm, "yes")]) 
    92                                         ], 
    93                           ) 
     100fya = Orange.data.filter.Values(domain=data.domain, conditions= 
     101    [ 
     102    Orange.data.filter.ValueFilterDiscrete( 
     103        position=data.domain.attributes.index(age), 
     104        values=[Orange.data.Value(age, "young"), 
     105                Orange.data.Value(age, "presbyopic")], acceptSpecial = 0), 
     106    Orange.data.filter.ValueFilterDiscrete( 
     107        position=data.domain.attributes.index(astigm), 
     108        values=[Orange.data.Value(astigm, "yes")]) 
     109    ]) 
    94110for ex in fya(data): 
    95111    print ex 
    96112 
    97113print "\nYoung or presbyopic with astigmatism" 
    98 fya = orange.Filter_values(domain = data.domain, 
    99                            conditions = [orange.ValueFilter_discrete(position = data.domain.attributes.index(age), values=[orange.Value(age, "young"), orange.Value(age, "presbyopic")], acceptSpecial = 1), 
    100                                          orange.ValueFilter_discrete(position = data.domain.attributes.index(astigm), values=[orange.Value(astigm, "yes")]) 
    101                                         ], 
    102                           ) 
     114fya = Orange.data.filter.Values(domain=data.domain, conditions= 
     115    [ 
     116    Orange.data.filter.ValueFilterDiscrete( 
     117        position=data.domain.attributes.index(age), 
     118        values=[Orange.data.Value(age, "young"), 
     119                Orange.data.Value(age, "presbyopic") 
     120                ], acceptSpecial = 1), 
     121    Orange.data.filter.ValueFilterDiscrete( 
     122        position=data.domain.attributes.index(astigm), 
     123        values=[Orange.data.Value(astigm, "yes")]) 
     124    ]) 
    103125for ex in fya(data): 
    104126    print ex 
    105127 
    106128print "\nYoung or presbyopic or astigmatic" 
    107 fya = orange.Filter_values(domain = data.domain, 
    108                            conditions = [orange.ValueFilter_discrete(position = data.domain.attributes.index(age), values=[orange.Value(age, "young"), orange.Value(age, "presbyopic")], acceptSpecial = 1), 
    109                                          orange.ValueFilter_discrete(position = data.domain.attributes.index(astigm), values=[orange.Value(astigm, "yes")]) 
    110                                         ], 
    111                            conjunction = 0 
    112                           ) 
     129fya = Orange.data.filter.Values(domain=data.domain, conditions= 
     130    [ 
     131    Orange.data.filter.ValueFilterDiscrete( 
     132        position=data.domain.attributes.index(age), 
     133        values=[Orange.data.Value(age, "young"), 
     134                Orange.data.Value(age, "presbyopic") 
     135                ], acceptSpecial = 1), 
     136    Orange.data.filter.ValueFilterDiscrete( 
     137        position=data.domain.attributes.index(astigm), 
     138        values=[Orange.data.Value(astigm, "yes")]) 
     139    ], 
     140    conjunction = 0 
     141) 
    113142for ex in fya(data): 
    114143    print ex 
  • docs/reference/rst/code/filterm.py

    r9671 r10031  
    1 import orange 
     1import Orange 
    22 
    3 data = orange.ExampleTable("inquisition") 
     3data = Orange.data.Table("inquisition") 
    44 
    5 haveSurprise = orange.Filter_hasMeta(data, id = data.domain.index("surprise")) 
    6 for ex in haveSurprise: 
    7     print ex 
     5surprised = Orange.data.filter.HasMeta(data, id=data.domain.index("surprise")) 
     6for i in surprised: 
     7    print i 
  • docs/reference/rst/code/filters.py

    r9671 r10031  
    1 import orange 
    2  
     1import Orange 
    32 
    43############ THIS IS WHAT YOU CAN DO WITH DISCRETE ATTRIBUTES 
    54 
    6 data = orange.ExampleTable("lenses") 
     5data = Orange.data.Table("lenses") 
    76 
    87data[0][0] = "?" 
     
    109data[1][1] = "?" 
    1110 
    12 fspec = orange.Filter_isDefined(domain=data.domain) 
     11fspec = Orange.data.filter.IsDefined(domain=data.domain) 
    1312print "\nCheck all attributes" 
    1413print [fspec(ex) for ex in data] 
  • docs/reference/rst/code/filterv.py

    r9671 r10031  
    1 import orange 
     1import Orange 
    22 
    33 
    44############ THIS IS WHAT YOU CAN DO WITH DISCRETE ATTRIBUTES 
    55 
    6 data = orange.ExampleTable("lenses") 
     6data = Orange.data.Table("lenses.tab") 
    77 
    88############ THIS IS WHAT YOU CAN DO WITH DISCRETE ATTRIBUTES 
    99 
    1010print "\nYoung or presbyopic with astigmatism" 
    11 fya = orange.Filter_values(domain = data.domain) 
     11fya = Orange.data.filter.Values(domain = data.domain) 
    1212fya["age"] = "young" 
    1313print "\nYoung examples\n" 
     
    1919for ex in fya(data): 
    2020    print ex 
    21  
    2221 
    2322fya["age"] = ["presbyopic", "young"] 
     
    3332    print ex 
    3433 
    35 fr = orange.Filter_values(domain = data.domain) 
     34fr = Orange.data.filter.Values(domain = data.domain) 
    3635fr[3] = "reduced" 
    3736 
    3837# Conjunction is not necessary here - we could still do this with a single filter 
    39 fcon = orange.Filter_conjunction([fya, fr]) 
     38fcon = Orange.data.filter.Conjunction([fya, fr]) 
    4039print "\n\nYoung and presbyopic examples that are astigmatic and have reduced tear rate\n" 
    4140for ex in fcon(data): 
    4241    print ex 
    4342 
    44 fcon = orange.Filter_disjunction([fya, fr]) 
     43fcon = Orange.data.filter.Disjunction([fya, fr]) 
    4544print "\n\nYoung and presbyopic asticmatic examples and examples that have reduced tear rate\n" 
    4645for ex in fcon(data): 
    4746    print ex 
    4847 
    49  
    5048############ THIS IS WHAT YOU CAN DO WITH CONTINUOUS ATTRIBUTES 
    5149 
    52 data = orange.ExampleTable("iris") 
    53  
    54 fcont = orange.Filter_values(domain = data.domain) 
    55 fcont[0] = (orange.ValueFilter.Equal, 4.59999999999999) # This is to check that rounding errors don't hurt 
     50data = Orange.data.Table("/Users/tomazc/workspace/orange/Orange/doc/reference/iris.tab") 
     51 
     52fcont = Orange.data.filter.Values(domain = data.domain) 
     53 
     54fcont[0] = (Orange.data.filter.ValueFilter.Equal, 4.59999999999999) # This is 
     55# to check that rounding errors don't hurt 
    5656print "\n\nThe first attribute equals 4.6" 
    5757for ex in fcont(data): 
    5858    print ex 
    5959 
    60 fcont[0] = (orange.ValueFilter.Less, 4.6) 
     60fcont[0] = (Orange.data.filter.ValueFilter.Less, 4.6) 
    6161print "\n\nThe first attribute is less than 4.6" 
    6262for ex in fcont(data): 
    6363    print ex 
    6464 
    65 fcont[0] = (orange.ValueFilter.LessEqual, 4.6) 
     65fcont[0] = (Orange.data.filter.ValueFilter.LessEqual, 4.6) 
    6666print "\n\nThe first attribute is less than or equal to 4.6" 
    6767for ex in fcont(data): 
    6868    print ex 
    6969 
    70 fcont[0] = (orange.ValueFilter.Greater, 7.6) 
     70fcont[0] = (Orange.data.filter.ValueFilter.Greater, 7.6) 
    7171print "\n\nThe first attribute is greater than 7.6" 
    7272for ex in fcont(data): 
    7373    print ex 
    7474 
    75 fcont[0] = (orange.ValueFilter.GreaterEqual, 7.6) 
     75fcont[0] = (Orange.data.filter.ValueFilter.GreaterEqual, 7.6) 
    7676print "\n\nThe first attribute is greater than or equal to 7.6" 
    7777for ex in fcont(data): 
    7878    print ex 
    7979 
    80 fcont[0] = (orange.ValueFilter.Between, 4.6, 5.0) 
     80fcont[0] = (Orange.data.filter.ValueFilter.Between, 4.6, 5.0) 
    8181print "\n\nThe first attribute is between to 4.5 and 5.0" 
    8282for ex in fcont(data): 
    8383    print ex 
    8484 
    85 fcont[0] = (orange.ValueFilter.Outside, 4.6, 7.5) 
     85fcont[0] = (Orange.data.filter.ValueFilter.Outside, 4.6, 7.5) 
    8686print "\n\nThe first attribute is between to 4.5 and 5.0" 
    8787for ex in fcont(data): 
     
    9191############ THIS IS WHAT YOU CAN DO WITH STRING ATTRIBUTES 
    9292 
    93 data.domain.addmeta(orange.newmetaid(), orange.StringVariable("name")) 
     93data.domain.addmeta( 
     94    Orange.data.feature.Descriptor.new_meta_id(), 
     95    Orange.data.StringVariable("name") 
     96) 
    9497for ex in data: 
    9598    ex["name"] = str(ex.getclass()) 
    9699 
    97 fstr = orange.Filter_values(domain = data.domain) 
     100fstr = Orange.data.filter.Values(domain = data.domain) 
    98101fstr["name"] = "Iris-setosa" 
    99102print "\n\nSetosae" 
     
    118121 
    119122print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    120 fstr["name"] = (orange.Filter_values.Less, "Iris-versicolor") 
     123fstr["name"] = (Orange.data.filter.Values.Less, "Iris-versicolor") 
    121124print "\n\nLess than versicolor" 
    122125d = fstr(data) 
    123126print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    124127 
    125 fstr["name"] = (orange.Filter_values.LessEqual, "Iris-versicolor") 
     128fstr["name"] = (Orange.data.filter.Values.LessEqual, "Iris-versicolor") 
    126129print "\n\nLess or equal versicolor" 
    127130d = fstr(data) 
    128131print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    129132 
    130 fstr["name"] = (orange.Filter_values.Greater, "Iris-versicolor") 
     133fstr["name"] = (Orange.data.filter.Values.Greater, "Iris-versicolor") 
    131134print "\n\nGreater than versicolor" 
    132135d = fstr(data) 
    133136print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    134137 
    135 fstr["name"] = (orange.Filter_values.GreaterEqual, "Iris-versicolor") 
     138fstr["name"] = (Orange.data.filter.Values.GreaterEqual, "Iris-versicolor") 
    136139print "\n\nGreater or equal versicolor" 
    137140d = fstr(data) 
    138141print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    139142 
    140 fstr["name"] = (orange.Filter_values.Between, "Iris-versicolor", "Iris-virginica") 
     143fstr["name"] = (Orange.data.filter.Values.Between, "Iris-versicolor", "Iris-virginica") 
    141144print "\n\nGreater or equal versicolor" 
    142145d = fstr(data) 
    143146print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    144147 
    145 fstr["name"] = (orange.Filter_values.Contains, "ers") 
     148fstr["name"] = (Orange.data.filter.Values.Contains, "ers") 
    146149print "\n\nContains 'ers'" 
    147150d = fstr(data) 
    148151print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    149152 
    150 fstr["name"] = (orange.Filter_values.NotContains, "ers") 
     153fstr["name"] = (Orange.data.filter.Values.NotContains, "ers") 
    151154print "\n\nDoesn't contain 'ers'" 
    152155d = fstr(data) 
    153156print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    154157 
    155 fstr["name"] = (orange.Filter_values.BeginsWith, "Iris-ve") 
     158fstr["name"] = (Orange.data.filter.Values.BeginsWith, "Iris-ve") 
    156159print "\n\nBegins with 'Iris-ve'" 
    157160d = fstr(data) 
    158161print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    159162 
    160 fstr["name"] = (orange.Filter_values.EndsWith, "olor") 
     163fstr["name"] = (Orange.data.filter.Values.EndsWith, "olor") 
    161164print "\n\nEnds with with 'olor'" 
    162165d = fstr(data) 
    163166print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    164167 
    165 fstr["name"] = (orange.Filter_values.EndsWith, "a"*50) 
     168fstr["name"] = (Orange.data.filter.Values.EndsWith, "a"*50) 
    166169print "\n\nBegins with '%s'" % ("a"*50) 
    167170d = fstr(data) 
     
    171174    print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    172175 
    173 fstr = orange.Filter_values(domain=data.domain) 
    174 fstr["name"] = (orange.Filter_values.BeginsWith, "Iris-VE") 
     176fstr = Orange.data.filter.Values(domain=data.domain) 
     177fstr["name"] = (Orange.data.filter.Values.BeginsWith, "Iris-VE") 
    175178fstr["name"].caseSensitive = 1 
    176179print "\n\nBegins with 'Iris-VE' (case sensitive)" 
     
    181184    print "%i examples, starting with %s\n  finishing with %s" % (len(d), d[0], d[-1]) 
    182185 
    183 fstr["name"] = (orange.Filter_values.BeginsWith, "Iris-VE") 
     186fstr["name"] = (Orange.data.filter.Values.BeginsWith, "Iris-VE") 
    184187fstr["name"].caseSensitive = 0 
    185188print "\n\nBegins with 'Iris-VE' (case insensitive)" 
     
    194197###### REFERENCES vs. COPIES OF EXAMPLES 
    195198 
    196 data = orange.ExampleTable("lenses") 
     199data = Orange.data.Table("lenses") 
    197200 
    198201print "\nYoung or presbyopic with astigmatism - as references" 
    199 fya = orange.Filter_values(domain = data.domain) 
     202fya = Orange.data.filter.Values(domain = data.domain) 
    200203fya["age"] = "young" 
    201204print "\nYoung examples\n" 
     
    215218###### COUNTS OF EXAMPLES 
    216219 
    217 data = orange.ExampleTable("lenses") 
    218 fya = orange.Filter_values(domain = data.domain) 
     220data = Orange.data.Table("lenses") 
     221fya = Orange.data.filter.Values(domain = data.domain) 
    219222fya["age"] = "young" 
    220223print "The data contains %i young fellows" % fya.count(data) 
  • source/orange/_aliases.txt

    r9903 r10031  
    7272ImputerConstructor 
    7373impute_class imputeClass 
     74 
     75Filter_random 
     76random_generator randomGenerator 
Note: See TracChangeset for help on using the changeset viewer.