Changeset 410:123fa099333a in orange-bioinformatics


Ignore:
Timestamp:
07/03/08 13:41:58 (5 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
48cb683a1fa91f74d685737e5626d02a3a414bfa
Message:

-added Selected attributes output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widgets/OWFeatureSelection.py

    r407 r410  
    3535        OWWidget.__init__(self, parent, signalManager, name, wantGraph=True, showSaveGraph=True) 
    3636        self.inputs = [("Examples", ExampleTable, self.SetData)] 
    37         self.outputs = [("Examples with selected attributes", ExampleTable), ("Examples with remaining attributes", ExampleTable)] 
     37        self.outputs = [("Examples with selected attributes", ExampleTable), ("Examples with remaining attributes", ExampleTable), ("Selected attributes", ExampleTable)] 
    3838 
    3939        self.methodIndex = 0 
     
    152152        else: 
    153153            text = "No data on input\n\n" 
    154         self.dataInfoLabel.setText(text)      
     154        self.dataInfoLabel.setText(text) 
    155155 
    156156    def UpdateSelectedInfoLabel(self, cutOffLower=0, cutOffUpper=0): 
     
    187187            remainingAttrs = [attr for attr in self.data.domain.attributes if  not test(attr, cutOffLower, cutOffUpper)] #self.scores.get(attr,0)>cutOffUpper or self.scores.get(attr,0)<cutOffLower] 
    188188            self.send("Examples with remaining attributes", self.data.select(remainingAttrs+[self.data.domain.classVar])) 
     189            domain = orange.Domain([orange.StringVariable("label")], False) 
     190            self.send("Selected attributes", orange.ExampleTable([orange.Example(domain, [attr.name]) for attr in selectedAttrs]) if selectedAttrs else None) 
     191             
    189192        else: 
    190193            self.send("Examples with selected attributes", None) 
    191194            self.send("Examples with remaining attributes", None) 
     195            self.send("Selected attributes", None) 
    192196 
    193197if __name__=="__main__": 
Note: See TracChangeset for help on using the changeset viewer.