8.1.1.6.1.2. blueoil.metrics.metrics

8.1.1.6.1.2.1. Module Contents

8.1.1.6.1.2.1.1. Functions

tp_tn_fp_fn_for_each(output, labels, threshold=0.5)

Calculate True Positive, True Negative, False Positive, False Negative.

tp_tn_fp_fn(output, labels, threshold=0.5)

Calculate True Positive, True Negative, False Positive, False Negative.

blueoil.metrics.metrics.tp_tn_fp_fn_for_each(output, labels, threshold=0.5)

Calculate True Positive, True Negative, False Positive, False Negative.

Parameters
  • output – network output sigmoided tensor. shape is [batch_size, num_class]

  • labels – multi label encoded bool tensor. shape is [batch_size, num_class]

  • threshold – python float

Returns

shape is [4(tp, tn, fp, fn), num_class]

blueoil.metrics.metrics.tp_tn_fp_fn(output, labels, threshold=0.5)

Calculate True Positive, True Negative, False Positive, False Negative.

Parameters
  • output – network output sigmoided tensor. shape is [batch_size, num_class]

  • labels – multi label encoded bool tensor. shape is [batch_size, num_class]

  • threshold – python float