Changeset 3653:390776953abd in orange


Ignore:
Timestamp:
05/14/07 14:50:36 (7 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
c0734718d322df6b17c8b5be0c2b497bdb05617a
Message:
  • fixed Jure's changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Regression/OWPade.py

    r3652 r3653  
    1414 
    1515    settingsList = ["output", "method", "derivativeAsMeta", "originalAsMeta", "savedDerivativeAsMeta", "differencesAsMeta", "enableThreshold", "threshold"] 
    16     #contextHandlers = {"": DomainContextHandler("", ["outputAttr", ContextField("attributes", DomainContextHandler.RequiredList, selected="dimensions")], False, False, False, False)} 
    1716    contextHandlers = {"": PerfectDomainContextHandler("", ["outputAttr", ContextField("attributes", selected="dimensions")])} 
    1817 
    19     #methodNames = ["First Triangle", "Star Regression", "Star Univariate Regression", "Tube Regression", "Canceling"]     
    20     #methods = [orngPade.firstTriangle, orngPade.starRegression, orngPade.starUnivariateRegression, orngPade.tubedRegression, orngPade.canceling] 
    2118    methodNames = ["First Triangle", "Star Univariate Regression", "Tube Regression"]     
    2219    methods = [orngPade.firstTriangle, orngPade.starUnivariateRegression, orngPade.tubedRegression] 
     
    3330        self.derivativeAsMeta = 0 
    3431        self.savedDerivativeAsMeta = 0 
     32        self.correlationsAsMeta = 1 
    3533        self.differencesAsMeta = 1 
    3634        self.originalAsMeta = 1 
     
    7371        self.metaCB = OWGUI.checkBox(box, self, "derivativeAsMeta", label="Qualitative constraint") 
    7472        OWGUI.checkBox(box, self, "differencesAsMeta", label="Derivatives of selected attributes") 
     73        OWGUI.checkBox(box, self, "correlationsAsMeta", label="Absolute values of derivatives") 
    7574        OWGUI.checkBox(box, self, "originalAsMeta", label="Original class attribute") 
    7675 
     
    9998 
    10099    def dimensionsChanged(self): 
    101         print self.dimensions 
    102100        if self.output and self.dimensions: 
    103101            if not self.metaCB.isEnabled(): 
     
    120118    def onDataInput(self, data): 
    121119        self.closeContext() 
    122         if data: 
     120        if data and self.isDataWithClass(data, orange.VarTypes.Continuous): 
    123121            orngPade.makeBasicCache(data, self) 
    124122 
    125123            icons = OWGUI.getAttributeIcons() 
    126             print data.domain.attributes, self.contAttributes 
    127124            self.outputLB.clear() 
    128125            for attr in self.contAttributes: 
     
    146143        if not self.deltas: 
    147144            self.deltas = [[None] * len(self.contAttributes) for x in xrange(len(self.data))] 
     145        if not self.errors: 
     146            self.errors = [[None] * len(self.contAttributes) for x in xrange(len(self.data))] 
    148147 
    149148        dimensionsToCompute = [d for d in self.dimensions if not self.deltas[0][d]] 
     
    155154            self.progressBarFinished() 
    156155 
    157         paded, derivativeID, metaIDs, classID = orngPade.createQTable(self, data, self.dimensions, 
     156        paded, derivativeID, metaIDs, classID, corrIDs = orngPade.createQTable(self, data, self.dimensions, 
    158157                                                             not self.output and -1 or self.outputAttr, 
    159158                                                             self.enableThreshold and abs(self.threshold), 
Note: See TracChangeset for help on using the changeset viewer.