Skip to content

Commit

Permalink
Update dtc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Iron-Stark authored Apr 5, 2017
1 parent f86b79a commit 9c70c11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion methods/scikit/dtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def BuildModel(self, data, labels):
max_depth=self.max_depth,
random_state=self.seed,
splitter = self.splitter,
min_samples_split = self.min_samples_split, min_weight_fraction_leaf=self.min_weight_fraction_leaf,
min_samples_split = self.min_samples_split,
min_weight_fraction_leaf=self.min_weight_fraction_leaf,
max_features = self.max_features,
max_leaf_nodes = self.max_leaf_nodes,
min_impurity_split = self.min_impurity_split,
Expand Down Expand Up @@ -105,6 +106,7 @@ def RunDTCScikit(q):
msl = re.search("--min_samples_leaf (\d+)", options)
mf = re.search("--max_features (\d+)", options)
mln = re.search("--max_leaf_nodes (\d+)", options)

self.criterion = 'gini' if not c else str(c.group(1))
self.max_depth = None if not d else int(d.group(1))
self.splitter = 'best' if not s else str(s.group(1))
Expand Down

0 comments on commit 9c70c11

Please sign in to comment.