22856afbd44b8179199f7629a54dea13043cdd5d,niftynet/evaluation/classification_evaluations.py,accuracy,layer_op,#accuracy#Any#Any#,19

Before Change


        metric_name = "accuracy_"
        if self.app_param.output_prob:
            inferred_label = np.amax(data["inferred"][0,0,0,0,:])
            metric_value = (inferred_label, data["label"][0,0,0,0,0])
        else:
            metric_value = (data["inferred"][0,0,0,0,0],
                            data["label"][0,0,0,0,0])
        results_dict = ResultsDictionary()

After Change


            inferred_label = np.amax(data["inferred"][0,0,0,0,:])
        else:
            inferred_label = data["inferred"][0,0,0,0,0]
        pdf = pd.DataFrame.from_records([{"subject_id":subject_id,
                                          "acc_i":inferred_label,
                                          "acc_l":data["label"][0,0,0,0,0]}],
                                        index=("subject_id",))
        return ResultsDictionary(pdf)
        
    def aggregate(self, df):
        agg = pd.DataFrame.from_records([{"accuracy":(df.acc_i==df.acc_l).mean()}])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: 22856afbd44b8179199f7629a54dea13043cdd5d
Time: 2018-02-16
Author: eli.gibson@gmail.com
File Name: niftynet/evaluation/classification_evaluations.py
Class Name: accuracy
Method Name: layer_op


Project Name: ina-foss/inaSpeechSegmenter
Commit Name: 4d8a1c5fd39f3189424479f6f463f0c5d4f567b7
Time: 2019-10-14
Author: ddoukhan@ina.fr
File Name: inaSpeechSegmenter/segmenter.py
Class Name:
Method Name: seg2csv


Project Name: etal/cnvkit
Commit Name: 1fe319ef49168c2c7c8d10a7c426c1414521d164
Time: 2016-10-28
Author: eric.talevich@gmail.com
File Name: cnvlib/tabio/genepred.py
Class Name:
Method Name: read_refflat