def new_test(): feed_dict = { self.x: ev_x, self.doc_len: ev_doc_len, self.keep_prob: 1.0, } y_true = ev_y y_pred_p = sess.run(prob, feed_dict=feed_dict) y_pred = calibrated_label_ranking(y_pred_p, For_calibrated_B) Emotion_eval(y_true, y_pred, y_pred_p)
def new_test(): feed_dict = { self.x: te_x, self.doc_len: te_doc_len, self.keep_prob: 1.0, } y_true = np.ceil(te_y) y_pred_p = sess.run(prob, feed_dict=feed_dict) #修改 : 采用calibrated label ranking 算法 # y_pred = np.ceil(y_pred_p-1.0/8) y_pred = calibrated_label_ranking(y_pred_p) Emotion_eval(y_true, y_pred, y_pred_p)