Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keras, Tensorflow - What is the meaning of K.epsilon when computing metrics

I am computing Recall and Accuracy for my model and I am wondering why people add Keras.epsilon() to their variables (examples found on stackoverflow : Macro metrics (recall/F1...) for multiclass CNN or How to calculate F1 Macro in Keras? )

Thank you very much for your answer !

Kindly

like image 833
chalbiophysics Avatar asked Dec 14 '22 08:12

chalbiophysics


1 Answers

When there's a division operation taking place, it's often added to the denominator to prevent a divide by zero error. Epsilon is small value (1e-07 in TensorFlow Core v2.2.0) that makes very little difference to the value of the denominator, but ensures that it isn't equal to exactly zero.

like image 66
k-venkatesan Avatar answered Feb 05 '23 23:02

k-venkatesan