You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I reviewed the section about model combination in NLP notebook. I think the calculation of baseline_pred_probs is wrong:
# Get mean pred probs for 3 models
baseline_pred_probs = np.max(model_0.predict_proba(val_sentences), axis=1) # get the prediction probabilities from baseline model
combined_pred_probs = baseline_pred_probs + tf.squeeze(model_2_pred_probs, axis=1) + tf.squeeze(model_6_pred_probs)
combined_preds = tf.round(combined_pred_probs/3) # average and round the prediction probabilities to get prediction classes
combined_preds[:20]
It should not be the max value, but simply the second column of the matrix. Hereafter, the version I propose:
# Get mean pred probs for 3 models
baseline_pred_probs = model_0.predict_proba(val_sentences)[:, 1] # get the prediction probabilities from baseline model
combined_pred_probs = baseline_pred_probs + tf.squeeze(model_2_pred_probs, axis=1) + tf.squeeze(model_6_pred_probs)
combined_preds = tf.round(combined_pred_probs/3) # average and round the prediction probabilities to get prediction classes
combined_preds[:20]
The text was updated successfully, but these errors were encountered:
I reviewed the section about model combination in NLP notebook. I think the calculation of
baseline_pred_probs
is wrong:It should not be the
max
value, but simply the second column of the matrix. Hereafter, the version I propose:The text was updated successfully, but these errors were encountered: