コード例 #1
0
def test_model_by_probs(name, description, label, model):
    pred_name = model.predict(name)
    pred_desc = model.predict(description)
    pred = pred_name + pred_desc
    pred_label = vec2label(pred)
    acc = accuracy_score(label, pred_label)
    print(acc)
    return acc
コード例 #2
0
def test_dpcnn(feature, label, model):
    pred = model.predict(feature)
    pred_label = vec2label(pred)
    acc = accuracy_score(label, pred_label)
    print(acc)
    return acc
コード例 #3
0
def test_cic(name, feature, label, model):
    pred = model.predict([name, feature])
    pred_label = vec2label(pred)
    acc = accuracy_score(label, pred_label)
    print(acc)
    return acc
コード例 #4
0
def test_mul_model(name, description, label, model):
    pred = model.predict([name, description])
    pred_label = vec2label(pred)
    acc = accuracy_score(label, pred_label)
    print(acc)
    return acc