737adbe4855d116648cc47f583e3cc258b35187c,src/skmultiflow/classification/trees/regression_hoeffding_tree.py,RegressionHoeffdingTree,predict,#RegressionHoeffdingTree#Any#,170
Before Change
r, _ = get_dimensions(X)
predictions = []
for i in range(r):
votes = self.get_votes_for_instance(X[i]).copy()
if votes == {}:
// Tree is empty, all target_values equal, default to zero
predictions.append([0])
else:
number_of_examples_seen = votes[0]
sum_of_values = votes[1]
predictions.append(sum_of_values / number_of_examples_seen)
After Change
sum_of_values = votes[1]
predictions.append(sum_of_values / number_of_examples_seen)
elif self.leaf_prediction == PERCEPTRON:
normalized_sample = self.normalize_sample(X[i])
normalized_prediction = np.dot(self.get_weights_for_instance(X[i]), normalized_sample)
mean = self.sum_of_values / self.examples_seen
sd = np.sqrt((self.sum_of_squares - self.sum_of_values ** 2
/ self.examples_seen) / self.examples_seen)
if self.examples_seen > 1:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 737adbe4855d116648cc47f583e3cc258b35187c
Time: 2018-07-02
Author: bader.d24@gmail.com
File Name: src/skmultiflow/classification/trees/regression_hoeffding_tree.py
Class Name: RegressionHoeffdingTree
Method Name: predict
Project Name: danielegrattarola/keras-gat
Commit Name: 9d56361641a64ff73ac630812ecd4964eedbc7aa
Time: 2017-11-09
Author: daniele.grattarola@gmail.com
File Name: gat/graph_attention_layer.py
Class Name: GraphAttention
Method Name: call
Project Name: keras-team/keras
Commit Name: c2244d2a4cb5f86968fb117f75469283a19b8a24
Time: 2018-10-21
Author: gabrieldemarmiesse@gmail.com
File Name: tests/keras/backend/backend_test.py
Class Name: TestBackend
Method Name: test_sparse_dot