Changeset 11776:f6a6d74a9dc2 in orange


Ignore:
Timestamp:
11/27/13 14:12:51 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed class treatment in Continuize widget.

(fixes #1347)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWContinuize.py

    r11748 r11776  
    138138        continuizer = self.constructContinuizer() 
    139139        self.send("Preprocessor", PreprocessedLearner( 
    140             lambda data, weightId=0, tc=(self.targetValue if self.classTreatment else -1): \ 
     140            lambda data, weightId=0, tc=(self.targetValue if self.classTreatment == 3 else -1): \ 
    141141                orange.ExampleTable(continuizer(data, weightId, tc) if data.domain.classVar and self.data.domain.classVar.varType == orange.VarTypes.Discrete else \ 
    142142                                    continuizer(data, weightId), data))) 
     
    147147        if self.data: 
    148148            if self.data.domain.classVar and self.data.domain.classVar.varType == orange.VarTypes.Discrete: 
    149                 domain = continuizer(self.data, 0, self.targetValue if self.classTreatment else -1) 
     149                domain = continuizer(self.data, 0, self.targetValue if self.classTreatment == 3 else -1) 
    150150            else: 
    151151                domain = continuizer(self.data, 0) 
Note: See TracChangeset for help on using the changeset viewer.