Changeset 10516:fe5deb61329c in orange


Ignore:
Timestamp:
03/13/12 19:11:38 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
Message:

Corrected Min nodes value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/OWNxHist.py

    r10513 r10516  
    3030        self.andor = 0 
    3131        self.matrix = None 
    32         self.excludeLimit = 1 
     32        self.excludeLimit = 2 
    3333        self.percentil = 0 
    3434 
     
    6161        hb = OWGUI.widgetBox(ribg, None, orientation="horizontal", addSpace=False) 
    6262        OWGUI.appendRadioButton(ribg, self, "netOption", "Large components only. Min nodes:", insertInto=hb, callback=self.generateGraph) 
    63         OWGUI.spin(hb, self, "excludeLimit", 1, 100, 1, callback=(lambda h=True: self.generateGraph(h))) 
     63        OWGUI.spin(hb, self, "excludeLimit", 2, 100, 1, callback=(lambda h=True: self.generateGraph(h))) 
    6464        OWGUI.appendRadioButton(ribg, self, "netOption", "Largest connected component only", callback=self.generateGraph) 
    6565        OWGUI.appendRadioButton(ribg, self, "netOption", "Connected component with vertex") 
     
    214214            # exclude unconnected 
    215215            if str(self.netOption) == '1': 
    216                 components = [x for x in Orange.network.nx.algorithms.components.connected_components(graph) if len(x) > self.excludeLimit] 
     216                components = [x for x in Orange.network.nx.algorithms.components.connected_components(graph) if len(x) >= self.excludeLimit] 
    217217                if len(components) > 0: 
    218218                    include = reduce(lambda x, y: x + y, components) 
Note: See TracChangeset for help on using the changeset viewer.