Miha Stajdohar committed dffc1b4

Fix run input signal funcs in this module.

  • Participants
  • Parent commits 35116e8

Comments (0)

Files changed (1)

File orangecontrib/modelmaps/widgets/

 <contact>Miha Stajdohar (miha.stajdohar(@at@)</contact> 
 import os.path
-from Orange import classification, misc, modelmaps, network, utils
-from import CommunityDetection
-from import OWNxCanvas
+from Orange import classification, data, misc, utils
+from Orange.orng.orngScaleLinProjData import *
+from Orange.OrangeWidgets.OWkNNOptimization import OWVizRank
+from Orange.OrangeWidgets.Visualize.OWDistributions import OWDistributionGraph
-from orngScaleLinProjData import *
-from OWkNNOptimization import OWVizRank
-from OWDistributions import OWDistributionGraph
-from import *
-from import *
+from orangecontrib import modelmaps, network
+from import CommunityDetection
+from import OWNxCanvas
+from import *
+from import *
 from PyQt4 import QtCore
 NAME = "Model Map"
 DESCRIPTIPN = "Visualization and analysis of prediction models"
 ICON = "icons/Network.png"
 PRIORITY = 6520
 INPUTS = [("Community Detection", CommunityDetection, "set_community"),
-          ("Distances", misc.SymMatrix, "set_matrix", Default),
+          ("Model Distances", misc.SymMatrix, "set_matrix", Default),
           ("Model Subset", data.Table, "set_models_subset")]
 OUTPUTS = [("Model", modelmaps.Model),
            ("Classifier", classification.Classifier),
            ("Selected Models", data.Table)]
-REPLACES = ["_modelmaps.widgets.OWModelMap.OWModelMap"]
 dir = utils.environ.widget_install_dir
 ICON_PATHS = [("TREE", "Classify/icons/ClassificationTree"),
 for size in ICON_SIZES:
     for model, path in ICON_PATHS:
         MODEL_IMAGES[model + size] = os.path.join(dir, "%s_%s.png" % (path, size))
 class ModelItem(orangeqt.ModelItem):
     def __init__(self, index, x=None, y=None, parent=None):
         orangeqt.ModelItem.__init__(self, index, OWPoint.Ellipse,, 5, parent)
 #            r = QtCore.QRectF(-tw / 2., self.size() / 2. + 5 + i * th, tw, th);
 #            painter.drawText(r, QtCore.Qt.AlignCenter, l);
 class ModelCurve(NetworkCurve):
     def __init__(self, parent=None, pen=QPen(, xData=None, yData=None):
         NetworkCurve.__init__(self, parent, pen=QPen(, xData=None, yData=None)
 class OWModelMapCanvas(OWNxCanvas):
     def __init__(self, master, parent=None, name="None"):
         map(lambda n: ModelItem.set_marked(n, True), self._expanded_nodes)
 class OWModelMap(OWNxExplorer, OWNxHist):
     settingsList = ["autoSendSelection", "spinExplicit", "spinPercentage",
     def __init__(self, parent=None, signalManager=None, name="Model Map"):
-        OWNxExplorer.__init__(self, parent, signalManager, name,
-                               NetworkCanvas=OWModelMapCanvas)
+        OWNxExplorer.__init__(self, parent, signalManager, name, NetworkCanvas=OWModelMapCanvas)
         OWNxHist.__init__(self, parent)
         self.inputs = [("Community Detection", CommunityDetection, self.set_community),
-                       ("Distances", misc.SymMatrix, self.set_matrix, Default),
+                       ("Model Distances", misc.SymMatrix, self.set_matrix),
                        ("Model Subset", data.Table, self.set_models_subset)]
         self.outputs = [("Model", modelmaps.Model),
 if __name__ == "__main__":
     import OWModelFile
     import pickle
     matrix.originalData = data.Table('%stab\\' % root)