24ca68494c32be150ce1c44c202f32af9f719742,enso/metrics/basic_seq_labeling.py,MicroCharPrecision,evaluate,#MicroCharPrecision#Any#Any#,61

Before Change


     Accuracy of overlaps 

    def evaluate(self, ground_truth, result):
        result_dict = tf_fp_fn_all_classes(*convert_to_per_char_labs(ground_truth, result))
        tp, fp, fn = 0, 0, 0
        for tp_i, fp_i, fn_i in result_dict.values():
            tp += tp_i

After Change


            tp += tp_i
            fp += fp_i
            fn += fn_i
        if tp + fp == 0:
            return 0.0
        return tp/float(tp+fp)

@Registry.register_metric(ModeKeys.SEQUENCE)
class MicroCharRecall(SequenceLabelingMetric):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: IndicoDataSolutions/Enso
Commit Name: 24ca68494c32be150ce1c44c202f32af9f719742
Time: 2018-12-17
Author: benlt@hotmail.co.uk
File Name: enso/metrics/basic_seq_labeling.py
Class Name: MicroCharPrecision
Method Name: evaluate


Project Name: IndicoDataSolutions/Enso
Commit Name: 24ca68494c32be150ce1c44c202f32af9f719742
Time: 2018-12-17
Author: benlt@hotmail.co.uk
File Name: enso/metrics/basic_seq_labeling.py
Class Name: MicroCharF1
Method Name: evaluate


Project Name: IndicoDataSolutions/Enso
Commit Name: 24ca68494c32be150ce1c44c202f32af9f719742
Time: 2018-12-17
Author: benlt@hotmail.co.uk
File Name: enso/metrics/basic_seq_labeling.py
Class Name: MicroCharRecall
Method Name: evaluate