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

Model evaluation error #125

Closed
binglinchengxiash opened this issue Jul 12, 2021 · 7 comments
Closed

Model evaluation error #125

binglinchengxiash opened this issue Jul 12, 2021 · 7 comments

Comments

@binglinchengxiash
Copy link

When the model is evaluated, an error is reported using java-small dataset.
image

@urialon
Copy link
Collaborator

urialon commented Jul 14, 2021

Hi @binglinchengxiash , thank you for your interest in our work!

It seems that the denominator is zero. This can be fixed by adding a line such as:

if self.nr_true_positives + self.nr_false_positives == 0:
   return 0

But I wonder why did it happen, it might hint that the test set is empty? Do you know whether there are any examples in the test/validation set?

@binglinchengxiash
Copy link
Author

Hi @binglinchengxiash , thank you for your interest in our work!

It seems that the denominator is zero. This can be fixed by adding a line such as:

if self.nr_true_positives + self.nr_false_positives == 0:
   return 0

But I wonder why did it happen, it might hint that the test set is empty? Do you know whether there are any examples in the test/validation set?

I use astminer to generate data for feeding code2vec.And the dataset is java-small. I found all results are zeros.I am not sure the reason.
image

@urialon
Copy link
Collaborator

urialon commented Jul 29, 2021

Hi @binglinchengxiash ,
Sorry for the delayed response.

Have you managed to solve this?
This may be a problem with astminer.

Best,
Uri

@binglinchengxiash
Copy link
Author

Thank you, I have solved my problems.

@WQR53
Copy link

WQR53 commented May 4, 2022

Hi @binglinchengxiash ,

I met the same problem that PRECISION, RECALL, and F1 were always zero when training.
"
2022-05-03 01:26:07,479 INFO After 12 epochs -- top10_acc: [0.32272727 0.51818182 0.61363636 0.66818182 0.69090909 0.73636364 0.75454545 0.76363636 0.76818182 0.79545455], precision: 0.0, recall: 0.0, F1: 0
2022-05-03 01:26:16,707 INFO Average loss at batch 100: 0.008121, throughput: 399 samples/sec
"
Do you know what causes this problem?What should I do to fix it?

I would be very grateful indeed for any help you could give me.

@urialon
Copy link
Collaborator

urialon commented May 4, 2022

Hi @WQR53 ,
Feel free to create a new issue to describe your problem, your settings, and your command lines.

Uri

@WQR53
Copy link

WQR53 commented May 4, 2022

Hi @urialon ,
I opened a new issue here . Thank you!

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

3 participants