I am working on Protein Secondary Structure Prediction using Recurrent Neural Network (GRU) model. I came across few open source projects which already worked on the similar problem. All of them are using Q8 Accuracy as evaluation metrics and the custom code they used for calculating Q8 accuracy is given below.
def accuracy(y_true, y_pred):
y = tf.argmax(y_true, axis =- 1)
y_ = tf.argmax(y_pred, axis =- 1)
mask = tf.greater(y, 0)
return K.cast(K.equal(tf.boolean_mask(y, mask), tf.boolean_mask(y_, mask)), K.floatx())
I would like to know the mathematical expression of Q8 accuracy corresponding to the above code snippet. The above code source project reference https://github.com/idrori/cu-ssp