source: orange/Orange/OrangeWidgets/Regression/OWKNNRegression.py @ 11096:cf7d2ae9d22b

Revision 11096:cf7d2ae9d22b, 869 bytes checked in by Ales Erjavec <ales.erjavec@…>, 19 months ago (diff)

Added new svg icons for the widgets/categories.

Line 
1"""
2<name>k Nearest Neighbours Regression</name>
3<description>K-nearest neighbours learner/predictor.</description>
4<icon>icons/kNearestNeighbours.svg</icon>
5<contact>Janez Demsar (janez.demsar(@at@)fri.uni-lj.si)</contact>
6<priority>20</priority>
7<keywords>knn</keywords>
8"""
9
10from OWKNN import *
11
12class OWKNNRegression(OWKNN):
13    def __init__(self, parent=None, signalManager=None, title="kNN Regression"):
14        OWKNN.__init__(self, parent, signalManager, title)
15       
16        self.inputs = [("Data", ExampleTable, self.setData), ("Preprocess", PreprocessedLearner, self.setPreprocessor)]
17        self.outputs = [("Learner", orange.Learner),("kNN Classifier", orange.kNNClassifier)]
18           
19    def setData(self,data):
20        self.data = self.isDataWithClass(data, orange.VarTypes.Continuous, checkMissing=True) and data or None
21        self.setLearner()
Note: See TracBrowser for help on using the repository browser.