Commits

Miran Levar committed f9890f7

Added choice of method to CT widget, centered pls icon

Comments (0)

Files changed (4)

_multitarget/widgets/OWClusteringTree.py

 from OWWidget import *
 import OWGUI
 
-
 class OWClusteringTree(OWWidget):
     settingsList = ["name", "min_instances", "min_majority",
-                    "max_depth", "min_MSE"]
+                    "max_depth", "min_MSE", "method"]
 
     def __init__(self, parent=None, signalManager=None,
                  title="Clustering Tree"):
         self.min_majority = 1.0
         self.min_MSE = 0.001
         self.min_instances = 5
+        self.method = 0
 
         self.loadSettings()
 
         OWGUI.spin(box, self, "min_instances", 1, 1000, 1,
                    "Min. instances in leaves")
 
+
+        OWGUI.radioButtonsInBox(self.controlArea, self, "method",
+              box = "Feature scorer",
+              btnLabels = ["Inter dist", "Intra dist", "Silhouette" ,"Gini-index"],
+              tooltips = ["Maximal distance between clusters",
+                          "Minimal distance inside clusters ",
+                          "Silhouette measure with prototypes",
+                          "Gini-index, used for nominal class variables"]
+                          )
+
         OWGUI.button(self.controlArea, self, "&Apply",
                      callback=self.apply,
                      tooltip="Create the learner and apply it on input data.",
                     min_majority=self.min_majority,
                     min_MSE=self.min_MSE,
                     min_instances=self.min_instances,
+                    method = self.method,
                     name=self.name)
 
         if self.preprocessor is not None:

_multitarget/widgets/icons/PLSClassification.png

Old
Old image
New
New image

_multitarget/widgets/icons/TestMTLearners_2.png

Removed
Old image

docs/rst/code/clustering_tree.py

 
 # Gini index should be used when working with nominal class variables
 ct4 = Orange.multitarget.tree.ClusteringTreeLearner(
-	max_depth = 50, min_majority = 0.4, min_instances = 5, 
+	max_depth = 50, min_majority = 0.6, min_instances = 5, 
 	method = Orange.multitarget.tree.gini_index, name = "CT gini index")
 
 
-# forests work better if trees pruned less
+# forests work better if trees are pruned less
 forest_tree = Orange.multitarget.tree.ClusteringTreeLearner(
 	max_depth = 50, min_majority = 1.0, min_instances = 3)
 clust_forest = Orange.ensemble.forest.RandomForestLearner(