Skip to content

Commit

Permalink
Fix tree preprocessors.
Browse files Browse the repository at this point in the history
Continuize must be in front of impute; the default order is okay.
  • Loading branch information
sstanovnik committed Jul 12, 2016
1 parent 9bf3fa0 commit 6e203ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions Orange/classification/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions Orange/regression/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from Orange.base import Tree
from Orange.regression import SklLearner, SklModel
from Orange.preprocess import Continuize, RemoveNaNColumns, SklImpute

__all__ = ["TreeRegressionLearner"]

Expand All @@ -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,
Expand Down

0 comments on commit 6e203ee

Please sign in to comment.