From 6e203ee50047b8793760927e2ea4f52aaba0f001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1o=20Stanovnik?= Date: Tue, 12 Jul 2016 13:38:13 +0200 Subject: [PATCH] Fix tree preprocessors. Continuize must be in front of impute; the default order is okay. --- Orange/classification/tree.py | 6 ------ Orange/regression/tree.py | 4 ---- 2 files changed, 10 deletions(-) diff --git a/Orange/classification/tree.py b/Orange/classification/tree.py index f85f4d79f86..c239b826765 100644 --- a/Orange/classification/tree.py +++ b/Orange/classification/tree.py @@ -2,8 +2,6 @@ from Orange.base import Tree from Orange.classification import SklLearner, SklModel -from Orange.preprocess import (RemoveNaNClasses, Continuize, - RemoveNaNColumns, SklImpute) __all__ = ["TreeLearner"] @@ -18,10 +16,6 @@ class TreeLearner(SklLearner): __wraps__ = skl_tree.DecisionTreeClassifier __returns__ = TreeClassifier name = 'tree' - preprocessors = [RemoveNaNClasses(), - RemoveNaNColumns(), - SklImpute(), - Continuize()] def __init__(self, criterion="gini", splitter="best", max_depth=None, min_samples_split=2, min_samples_leaf=1, diff --git a/Orange/regression/tree.py b/Orange/regression/tree.py index 9e0b1794964..ad29da4ddc0 100644 --- a/Orange/regression/tree.py +++ b/Orange/regression/tree.py @@ -2,7 +2,6 @@ from Orange.base import Tree from Orange.regression import SklLearner, SklModel -from Orange.preprocess import Continuize, RemoveNaNColumns, SklImpute __all__ = ["TreeRegressionLearner"] @@ -17,9 +16,6 @@ class TreeRegressionLearner(SklLearner): __wraps__ = skl_tree.DecisionTreeRegressor __returns__ = TreeRegressor name = 'regression tree' - preprocessors = [RemoveNaNColumns(), - SklImpute(), - Continuize()] def __init__(self, criterion="mse", splitter="best", max_depth=None, min_samples_split=2, min_samples_leaf=1,