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
def test_dpcnn(feature, label, model): pred = model.predict(feature) pred_label = vec2label(pred) acc = accuracy_score(label, pred_label) print(acc) return acc
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
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