Changeset 9466:184c106a9b60 in orange


Ignore:
Timestamp:
07/29/11 06:27:54 (3 years ago)
Author:
wencanluo <wencanluo@…>
Branch:
default
Convert:
ee62a2c940fedec3fbc31356d200169be1106fbe
Message:

Rename the mulan transformation module name

Location:
orange
Files:
3 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/evaluation/testing.py

    r9456 r9466  
    774774    #check if the data is a multi-label data 
    775775    multilabel_flag = label.is_multilabel(examples) 
    776      
     776 
    777777    if multilabel_flag == 0 and not examples.domain.class_var: #single-label 
    778778        raise ValueError("Test data set without class attribute") 
     
    860860                    for cl in range(nLrn): 
    861861                        if not cache or not test_results.loaded[cl]: 
    862                             cr = classifiers[cl](ex, Orange.core.GetBoth)                                       
     862                            cr = classifiers[cl](ex, Orange.core.GetBoth)                        
    863863                            if multilabel_flag == 0 and cr[0].isSpecial(): 
    864864                                raise "Classifier %s returned unknown value" % (classifiers[cl].name or ("#%i" % cl)) 
  • orange/Orange/multilabel/label.py

    r9460 r9466  
    2020    if not isinstance(data, Orange.data.Table): 
    2121        raise TypeError('data must be of type \'Orange.data.Table\'') 
    22     if not data.domain.classVar and get_num_labels(data) > 0: 
     22    if get_num_labels(data) > 0: 
    2323        return 1 
    2424    return 0 
  • orange/Orange/multilabel/mlknn.py

    r9464 r9466  
    133133        :type k: int 
    134134         
    135         :param smooth: Smoothing parameter controlling the strength of uniform prior (Default value is set to 1 which yields the Laplace smoothing). 
     135        :param smooth: Smoothing parameter controlling the strength of uniform prior  
     136        (Default value is set to 1 which yields the Laplace smoothing). 
    136137        :type smooth: Float 
    137138         
     
    298299        
    299300        disc = Orange.statistics.distribution.Discrete(prob) 
    300         disc.variable = Orange.core.EnumVariable(values = [domain[val].name for index,val in enumerate(self.label_indices)]) 
     301        disc.variable = Orange.core.EnumVariable( 
     302            values = [domain[val].name for index,val in enumerate(self.label_indices)]) 
    301303         
    302304        if result_type == Orange.classification.Classifier.GetValue: 
  • orange/Orange/multilabel/mmp.py

    r9464 r9466  
    123123         
    124124        disc = Orange.statistics.distribution.Discrete(prob) 
    125         disc.variable = Orange.core.EnumVariable(values = [domain[val].name for index,val in enumerate(self.label_indices)]) 
     125        disc.variable = Orange.core.EnumVariable( 
     126            values = [domain[val].name for index,val in enumerate(self.label_indices)]) 
    126127         
    127128        if result_type == Orange.classification.Classifier.GetValue: 
  • orange/doc/Orange/rst/code/mlc-evaluator.py

    r9454 r9466  
    22 
    33learners = [Orange.multilabel.BinaryRelevanceLearner(name="br")] 
    4 data = Orange.data.Table("multidata") 
     4data = Orange.data.Table("multidata.tab") 
    55 
    66res = Orange.evaluation.testing.cross_validation(learners, data) 
Note: See TracChangeset for help on using the changeset viewer.