tensorflowtfx

What does tfma.metrics.MeanLabel do?


I am interested in what tfma.metrics.MeanLabe does, and how it should be used, and what the difference is between tfma.metrics.MeanLabe and tfma.metrics.MeanPredictio and tfma.metrics.MeanAttributions. I am not sure why there is no explanation about these functions and the job that they do? How I can understand the details about them?


Solution

  • TFMA provides support for calculating metrics that were used at training time (i.e. built-in metrics) as well metrics defined after the model was saved as part of the TFMA configuration settings.
    tfma.metrics.* consists of Standard TFMA metrics and plots.

    tfma.metrics.MeanLabel calculates mean label by calculating the ratio of total weighted labels and total weighted examples.

    tfma.metrics.MeanPrediction calculates mean prediction by calculating the ratio of total weighted predictions and total weighted examples.

    tfma.metrics.MeanAttributions calculates mean attributions by calculating contribution of each input feature to the prediction made by the model.

    This metrics are provided in metrics_specs section of tfma.EvalConfig which holds specifications for the model, metrics, and slices that are to be evaluated. Please refer TFMA tutorial for better understanding on using these metrics.