Changeset 10913:1b281e538a8f in orange


Ignore:
Timestamp:
06/14/12 12:17:19 (22 months ago)
Author:
mstajdohar
Branch:
default
rebase_source:
2551c1138a1ef81da5ceb6d10967ffeb8505405d
Message:

Fixed Radviz jittering. Before, points in the center were scattered all around the plot.

Location:
Orange
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Visualize/OWLinProj.py

    r10466 r10913  
    324324    # EVENTS 
    325325    def resetGraphData(self): 
     326 
     327        tmp = self.graph.jitter_size      # do not jitter Radviz before final projection, 
     328        if self.graph.normalize_examples: # or points in the center will be scattered all over the place 
     329            self.graph.jitter_size = 0 
     330 
    326331        self.graph.rescaleData() 
     332        self.graph.jitter_size = tmp 
     333 
    327334        self.updateGraph() 
    328335 
  • Orange/OrangeWidgets/Visualize/OWLinProjGraph.py

    r10705 r10913  
    147147        dataSize = len(self.rawData) 
    148148        validData = self.getValidList(indices) 
    149         transProjData = self.createProjectionAsNumericArray(indices, validData = validData, scaleFactor = self.scaleFactor, normalize = self.normalizeExamples, jitterSize = -1, useAnchorData = 1, removeMissingData = 0) 
     149        # jitter point if Radviz 
     150        transProjData = self.createProjectionAsNumericArray(indices, validData = validData, scaleFactor = self.scaleFactor, normalize = self.normalizeExamples, jitterSize = self.jitter_size if self.normalizeExamples else -1, useAnchorData = 1, removeMissingData = 0) 
    150151        if transProjData == None: 
    151152            return 
     
    259260            anchorRadius = numpy.sqrt(XAnchors*XAnchors + YAnchors*YAnchors) 
    260261            validSubData = self.getValidSubsetList(indices) 
    261             projSubData = self.createProjectionAsNumericArray(indices, validData = validSubData, scaleFactor = self.scaleFactor, normalize = self.normalizeExamples, jitterSize = -1, useAnchorData = 1, removeMissingData = 0, useSubsetData = 1).T 
     262            # jitter points if Radviz 
     263            projSubData = self.createProjectionAsNumericArray(indices, validData = validSubData, scaleFactor = self.scaleFactor, normalize = self.normalizeExamples, jitterSize = self.jitter_size if self.normalizeExamples else -1, useAnchorData = 1, removeMissingData = 0, useSubsetData = 1).T 
    262264            sub_x_positions = projSubData[0] 
    263265            sub_y_positions = projSubData[1] 
  • Orange/data/preprocess/scaling.py

    r10912 r10913  
    363363                                         axis = 1) 
    364364 
    365         # Random generators for jittering  
     365        # Random generators for jittering 
    366366        random = numpy.random.RandomState(seed=self.jitter_seed) 
    367367        rand_seeds = random.random_integers(0, sys.maxint - 1, size=len(data.domain)) 
Note: See TracChangeset for help on using the changeset viewer.