...
/Enhancing Model Selection with Custom Metrics
Enhancing Model Selection with Custom Metrics
Discover how to implement custom metrics to refine model evaluation and selection.
We'll cover the following...
Metrics customization
Looking at suitably chosen metrics for a problem tremendously increases the ability to develop better models. Although a metric does not directly improve model training, it helps in a better model selection.
Several metrics are available outside TensorFlow, such as in sklearn
. However, they can’t be used directly during model training in TensorFlow. This is because the metrics are computed while processing batches during each training epoch.
Fortunately, TensorFlow provides the ability for this customization. The custom-defined metrics F1Score
and FalsePositiveRate
are provided in the user-defined performancemetrics
library. Learning the programmatic context for the customization is important and, therefore, is elucidated here.
The TensorFlow official guide shows the steps ...