Changeset 8829:2229b1177327 in orange


Ignore:
Timestamp:
08/29/11 14:30:24 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
b09178cc5b3ba2078d33696bad3f781f9965a964
Message:

Added special casses for 3d widgets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWkNNOptimization.py

    r8735 r8829  
    7878        self.buttonBox = OWGUI.widgetBox(self.optimizationBox, orientation = "horizontal") 
    7979 
    80         if visualizationMethod != SCATTERPLOT: 
     80        if visualizationMethod != SCATTERPLOT and visualizationMethod != SCATTERPLOT3D: 
    8181            self.label1 = OWGUI.widgetLabel(self.buttonBox, 'Projections with ' ) 
    8282            self.optimizationTypeCombo = OWGUI.comboBox(self.buttonBox, self, "optimizationType", items = ["    exactly    ", "  maximum  "] ) 
     
    105105        self.testingCombo = OWGUI.comboBox(self.optimizationSettingsDiscClassBox, self, "testingMethod", label = "Testing method:                             ", orientation = "horizontal", items = ["Leave one out (slowest)", "10 fold cross validation", "Test on learning set (fastest)"], tooltip = "Method for evaluating the classifier. Slower are more accurate while faster give only a rough approximation.") 
    106106        OWGUI.checkBox(self.optimizationSettingsDiscClassBox, self, 'useExampleWeighting', 'Use example weighting', tooltip = "For datasets where we have uneven class distribution we can weight examples") 
    107         if visualizationMethod != SCATTERPLOT: 
     107        if visualizationMethod != SCATTERPLOT and visualizationMethod != SCATTERPLOT3D: 
    108108            OWGUI.checkBox(self.optimizationSettingsDiscClassBox, self, 'storeEachPermutation', 'Save all projections for each permutation of attributes', tooltip = "Do you want to see in the projection list all evaluated projections or only the best projection for each attribute permutation.\nUsually this value is unchecked.") 
    109109 
    110         if visualizationMethod == LINEAR_PROJECTION: 
     110        if visualizationMethod == LINEAR_PROJECTION or visualizationMethod == LINEAR_PROJECTION3D: 
    111111            OWGUI.comboBox(self.SettingsTab, self, "projOptimizationMethod", "Projection Optimization Method", items = ["None", "Supervised projection pursuit", "Partial least square"], sendSelectedValue = 0, tooltip = "What method do you want to use to find an interesting projection with good class separation?") 
    112112        else: 
     
    706706    def evaluateProjections(self): 
    707707        if str(self.startOptimizationButton.text()) == "Start Evaluating Projections": 
    708             if self.attributeCount >= 10 and self.projOptimizationMethod == 0 and self.visualizationMethod != SCATTERPLOT and self.attrSubsetSelection != GAMMA_SINGLE and QMessageBox.critical(self, 'VizRank', 'You chose to evaluate projections with a high number of attributes. Since VizRank has to evaluate different placements\nof these attributes there will be a high number of projections to evaluate. Do you still want to proceed?','Continue','Cancel', '', 0,1): 
     708            if self.attributeCount >= 10 and self.projOptimizationMethod == 0 and self.visualizationMethod not in [SCATTERPLOT, SCATTERPLOT3D] and self.attrSubsetSelection != GAMMA_SINGLE and QMessageBox.critical(self, 'VizRank', 'You chose to evaluate projections with a high number of attributes. Since VizRank has to evaluate different placements\nof these attributes there will be a high number of projections to evaluate. Do you still want to proceed?','Continue','Cancel', '', 0,1): 
    709709                return 
    710710            if not self.graph.dataHasDiscreteClass: 
     
    826826            attrs = self.arguments[classInd][ind][2] 
    827827            self.graph.updateData(attrs[0], attrs[1], self.graph.dataDomain.classVar.name) 
     828        elif self.visualizationMethod == SCATTERPLOT3D: 
     829            attrs = self.arguments[classInd][ind][2] 
     830            self.graph.updateData(attrs[0], attrs[1], attrs[3], self.graph.dataDomain.classVar.name) 
     831        elif self.visulizationMethod == LINEAR_PROJECTION3D or self.visualizationMethod == SPHEREVIZ3D: 
     832            self.graph.updateData(self.arguments[classInd][ind][2], setAnchors = 1, XAnchors = generalDict.getX("XAnchors"), YAnchors = generalDict.get("YAnchors"), ZAnchors = generalDict.get("ZAnchors")) 
    828833        else: 
    829834            self.graph.updateData(self.arguments[classInd][ind][2], setAnchors = 1, XAnchors = generalDict.get("XAnchors"), YAnchors = generalDict.get("YAnchors")) 
Note: See TracChangeset for help on using the changeset viewer.