1 year ago

#339474

test-img

ForestGump

How can I define custom geometric mean evaluation metrics in tensorflow 2.0?

How can implement the following imblearn geometric mean in Tensorflow to compile LSTM model?

from imblearn.metrics import geometric_mean_score
gmean = geometric_mean_score(yTest,yPred)

I wanted to use the following option, but it is not working like metrics=[keras.metrics.AUC(name='auc')]

from keras import backend 
def gmean(y_true, y_pred):
    return backend.geometric_mean_score(yTest,yPred)

I tried this Available StackOverflow suggestions , but it didn't work as well.

keras

tensorflow2.0

tf.keras

imblearn

0 Answers

Your Answer

Accepted video resources