source: orange/orange/OrangeWidgets/Regression/OWKNNRegression.py @ 9223:589e2a54c8e8

Revision 9223:589e2a54c8e8, 873 bytes checked in by ales_erjavec <ales.erjavec@…>, 2 years ago (diff)

Added Random Forest Regression, SVM Regression, Mean k-NN Regression widgets.
Changed widget priorities.

Line 
1"""
2<name>k Nearest Neighbours Regression</name>
3<description>K-nearest neighbours learner/predictor.</description>
4<icon>icons/kNearestNeighbours.png</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 = [("Examples", 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.