Metrics and loss
These functions are taken mostly from sakitools, which is developed by Fabian hickert
dice_coef
dice_coef (y_true, y_pred, smooth=0)
tversky_focal_loss
tversky_focal_loss (alpha=0.5, beta=0.5, gamma=1.5, name=None)
dice_loss
dice_loss (y_true, y_pred)
dice_coef_loss
dice_coef_loss (y_true, y_pred)
FDR
FDR (thresholds=0.5, name='fdr_overreject', **kwargs)
! FDR - False discovery rate metric FP / (FP + TP)
FNR
FNR (thresholds=0.5, name='fnr_escapee', **kwargs)
! FNR - False negative rate metric FN / (FN + TP)
tversky_index
tversky_index (alpha=0.5, beta=0.5, gamma=1.5, name=None)