1

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.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
ForestGump
  • 50
  • 2
  • 19

0 Answers0