Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这里计算pred_y是不是有问题? #4

Open
gwd777 opened this issue May 22, 2024 · 0 comments
Open

这里计算pred_y是不是有问题? #4

gwd777 opened this issue May 22, 2024 · 0 comments

Comments

@gwd777
Copy link

gwd777 commented May 22, 2024

pred_y只是取【a0,a1】当中的a1,不应该是取max(a0,a1)嘛?如果这样处理,那么新来的一个样本,如何确定它是否有缺陷呢?

def test_model(test_set,policy_net):
policy_net.eval()
test_X, test_y=test_set[:,:-1], test_set[:,-1]
pred_y=policy_net(test_X).detach().cpu().numpy()[:,1]

roc = roc_auc_score(test_y, pred_y)
pr = average_precision_score(test_y, pred_y)
policy_net.train()
return roc,pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant