def f1_score(y_real, y_pred):
 return fbeta_score(y_real, y_pred, 1)

def f1_score ( y_real , y_pred ) : return fbeta_score ( y_real , y_pred , 1 )
compute f1 score the f1 score can be interpreted as a weighted average of the precision and recall .