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.

desertnaut
  • 52,940
  • 19
  • 125
  • 157
ForestGump
  • 84
  • 8

0 Answers0