Graph-Embeddding icon indicating copy to clipboard operation
Graph-Embeddding copied to clipboard

data_process.py中 my_SVM函数是否有错误

Open carain opened this issue 1 year ago • 1 comments

首先感谢分享!

代码中: score = f1_score(Pred_Y, Y_test, average='weighted')

其中Pred_Y, Y_test是否反了,看f1_scroe中的函数定义如下:

def f1_score(
    y_true,
    y_pred,
    *,
    labels=None,
    pos_label=1,
    average="binary",
    sample_weight=None,
    zero_division="warn",
):

y_true : 1d array-like, or label indicator array / sparse matrix
    Ground truth (correct) target values.

y_pred : 1d array-like, or label indicator array / sparse matrix
    Estimated targets as returned by a classifier.

carain avatar Aug 15 '23 10:08 carain