Skip to content

Commit

Permalink
Merge pull request #913 from lanzagar/preproc_poly
Browse files Browse the repository at this point in the history
PolynomialLearner: Add default preprocessors
  • Loading branch information
acopar committed Dec 11, 2015
2 parents 18e5029 + 780d0a0 commit a05e51c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Orange/regression/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import sklearn.pipeline as skl_pipeline
import sklearn.preprocessing as skl_preprocessing

from Orange.regression import Learner, Model, SklLearner, SklModel
from Orange.data import Variable, ContinuousVariable
from Orange.preprocess import Continuize, RemoveNaNColumns, SklImpute
from Orange.preprocess.score import LearnerScorer
from Orange.regression import Learner, Model, SklLearner, SklModel


__all__ = ["LinearRegressionLearner", "RidgeRegressionLearner",
"LassoRegressionLearner", "SGDRegressionLearner",
Expand Down Expand Up @@ -102,6 +104,9 @@ def fit(self, X, Y, W):

class PolynomialLearner(Learner):
name = 'poly learner'
preprocessors = [Continuize(),
RemoveNaNColumns(),
SklImpute(force=False)]

def __init__(self, learner, degree=1, preprocessors=None):
super().__init__(preprocessors=preprocessors)
Expand Down

0 comments on commit a05e51c

Please sign in to comment.