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/selection-bayes.py

    r9661 r9823  
    33# Uses:        voting 
    44# Referenced:  Orange.feature.html#selection 
    5 # Classes:     Orange.feature.scoring.score_all, Orange.feature.selection.best_n 
     5# Classes:     Orange.feature.scoring.score_all, Orange.feature.selection.bestNAtts 
    66 
    77import Orange 
     
    1515        else: 
    1616            return learner 
    17  
     17     
    1818    def __init__(self, name='Naive Bayes with FSS', N=5): 
    1919        self.name = name 
    2020        self.N = 5 
    21  
    22     def __call__(self, data, weight=None): 
    23         ma = Orange.feature.scoring.score_all(data) 
    24         filtered = Orange.feature.selection.select_best_n(data, ma, self.N) 
     21       
     22    def __call__(self, table, weight=None): 
     23        ma = Orange.feature.scoring.score_all(table) 
     24        filtered = Orange.feature.selection.selectBestNAtts(table, ma, self.N) 
    2525        model = Orange.classification.bayes.NaiveLearner(filtered) 
    2626        return BayesFSS_Classifier(classifier=model, N=self.N, name=self.name) 
     
    2929    def __init__(self, **kwds): 
    3030        self.__dict__.update(kwds) 
    31  
    32     def __call__(self, example, resultType=Orange.core.GetValue): 
     31     
     32    def __call__(self, example, resultType = Orange.core.GetValue): 
    3333        return self.classifier(example, resultType) 
    3434 
Note: See TracChangeset for help on using the changeset viewer.