Skip to content

Commit 94e5775

Browse files
authored
Update cart.py
1 parent 207d77f commit 94e5775

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

charpter12_XGBoost/cart.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def __init__(self, feature_i=None, threshold=None,
1515
self.left_branch = left_branch
1616
# 右子树
1717
self.right_branch = right_branch
18-
1918

2019
### 定义二叉决策树
2120
class BinaryDecisionTree(object):
@@ -156,7 +155,7 @@ def fit(self, X, y):
156155
self.impurity_calculation = self._calculate_gini_impurity
157156
self._leaf_value_calculation = self._majority_vote
158157
super(ClassificationTree, self).fit(X, y)
159-
158+
160159

161160
### CART回归树
162161
class RegressionTree(BinaryDecisionTree):

0 commit comments

Comments
 (0)