6bf1dd3ada59f67c91c815a31d440de61632220e,src/skmultiflow/trees/hoeffding_tree.py,HoeffdingTree,partial_fit,#HoeffdingTree#Any#Any#Any#Any#,887
Before Change
self.classes = classes
if y is not None:
if weight is None:
weight = np.array([1.0])
row_cnt, _ = get_dimensions(X)
wrow_cnt, _ = get_dimensions(weight)
if row_cnt != wrow_cnt:
weight = [weight[0]] * row_cnt
for i in range(row_cnt):
if weight[i] != 0.0:
self._train_weight_seen_by_model += weight[i]
self._partial_fit(X[i], y[i], weight[i])
def _partial_fit(self, X, y, weight):
After Change
if y is not None:
row_cnt, _ = get_dimensions(X)
if weight is None:
weight = np.ones(row_cnt)
if row_cnt != len(weight):
raise ValueError("Inconsistent number of instances ({}) and weights ({}).".format(row_cnt, len(weight)))
for i in range(row_cnt):
if weight[i] != 0.0:
self._train_weight_seen_by_model += weight[i]
self._partial_fit(X[i], y[i], weight[i])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 21
Instances
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 6bf1dd3ada59f67c91c815a31d440de61632220e
Time: 2019-02-25
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/trees/hoeffding_tree.py
Class Name: HoeffdingTree
Method Name: partial_fit
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 6496c605ad12f3eaac3939804ee8bef0b82a2692
Time: 2019-02-27
Author: aquancva@gmail.com
File Name: src/skmultiflow/trees/hoeffding_tree.py
Class Name: HoeffdingTree
Method Name: partial_fit
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 6496c605ad12f3eaac3939804ee8bef0b82a2692
Time: 2019-02-27
Author: aquancva@gmail.com
File Name: src/skmultiflow/trees/regression_hoeffding_tree.py
Class Name: RegressionHoeffdingTree
Method Name: partial_fit