7301f860743d7b45cd1d885094bf753629b535e8,src/skmultiflow/classification/trees/hoeffding_tree.py,HoeffdingTree,predict_proba,#HoeffdingTree#Any#,1063

Before Change


                predictions.append([0])
            else:
                normalize_values_in_dict(votes)
                y_proba = []
                for j in range(1 + int(max(votes.keys()))):
                    if j in votes.keys():
                        y_proba.append(votes[j])
                    else:
                        y_proba.append(0)
                predictions.append(y_proba)
        return predictions

    @property

After Change


                // Tree is empty, all target_values equal, default to zero
                predictions.append([0])
            else:
                if sum(votes.values()) != 0:
                    normalize_values_in_dict(votes)
                y_proba = [0] * (int(max(votes.keys())) + 1)
                for key, value in votes.items():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 7301f860743d7b45cd1d885094bf753629b535e8
Time: 2018-06-14
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/classification/trees/hoeffding_tree.py
Class Name: HoeffdingTree
Method Name: predict_proba


Project Name: home-assistant/home-assistant
Commit Name: 1d615ea6c3a5f9b3ae6481b827919f04f23c09ce
Time: 2017-08-25
Author: marhje52@kth.se
File Name: homeassistant/components/notify/mysensors.py
Class Name: MySensorsNotificationService
Method Name: send_message


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 0685dcd247e1c9b696c0d865f0851f68d1f7b66c
Time: 2018-06-18
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/classification/trees/hoeffding_tree.py
Class Name: HoeffdingTree
Method Name: predict_proba


Project Name: home-assistant/home-assistant
Commit Name: 8775c54d29a4adcc11a55c4a37db7da54eccc6e7
Time: 2017-08-25
Author: marhje52@kth.se
File Name: homeassistant/components/notify/mysensors.py
Class Name: MySensorsNotificationService
Method Name: send_message