Commits

Miran Levar  committed a1b6718

Added icon to PLS and additional parameters to chain widgets.

  • Participants
  • Parent commits e2c9a61

Comments (0)

Files changed (4)

File _multitarget/widgets/OWClassifierChain.py

 
 
 class OWClassifierChain(OWWidget):
-    settingsList = ["name"]
+    settingsList = ["name", "actual_values"]
 
     def __init__(self, parent=None, signalManager=None,
                  title="Classifier Chain"):
                         ("Classifier", Orange.classification.Classifier)]
 
         self.name = "Classifier Chain"
+        self.actual_values = False
 
         self.loadSettings()
 
         box = OWGUI.widgetBox(self.controlArea, "Learner/Classifier Name")
         OWGUI.lineEdit(box, self, "name")
 
+        box = OWGUI.widgetBox(self.controlArea, "Settings",
+                              addSpace=True)
+
+        OWGUI.checkBox(box, self, "actual_values", 
+                   label="Use actual values",
+                   tooltip="Use actual values insteand of predicted ones when adding classes into features.")
+
         OWGUI.button(self.controlArea, self, "&Apply",
                      callback=self.apply,
                      autoDefault=True)
         learner = None
         if self.base_learner is not None:
             learner = Orange.multitarget.chain.ClassifierChainLearner(
-                name=self.name, learner=self.base_learner
+                name=self.name, learner=self.base_learner, actual_values=self.actual_values
             )
 
         classifier = None

File _multitarget/widgets/OWEnsembleClassifierChain.py

 
 
 class OWEnsembleClassifierChain(OWWidget):
-    settingsList = ["name", "n_chains", "sample_size"]
+    settingsList = ["name", "n_chains", "sample_size", "actual_values"]
 
     def __init__(self, parent=None, signalManager=None,
                  title="Ensemble Classifier Chain"):
         self.name = "Ensemble Classifier Chain"
         self.n_chains = 50
         self.sample_size = 0.25
+        self.actual_values = False
 
         self.loadSettings()
 
                                  "original data."
                         )
 
+        OWGUI.checkBox(box, self, "actual_values", 
+                   label="Use actual values",
+                   tooltip="Use actual values insteand of predicted ones when adding classes into features.")
+
         OWGUI.button(self.controlArea, self, "&Apply",
                      callback=self.apply,
                      autoDefault=True)
         if self.base_learner is not None:
             learner = Orange.multitarget.chain.EnsembleClassifierChainLearner(
                 name=self.name, learner=self.base_learner,
-                n_chains=self.n_chains, sample_size=self.sample_size
+                n_chains=self.n_chains, sample_size=self.sample_size, actual_values=self.actual_values
             )
 
         classifier = None

File _multitarget/widgets/OWPLSClassifier.py

 """<name>PLS Classification</name>
 <description>PLS Classification</description>
 <priority>160</priority>
+<icon>icons/PLSClassification.png</icon>
 """
 
 import Orange

File _multitarget/widgets/icons/PLSClassification.png

Added
New image