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

Nan probabilities prediction on datasets with (almost) constant data #56

Open
stranger-codebits opened this issue Sep 20, 2022 · 3 comments

Comments

@stranger-codebits
Copy link

When training a new model ore even using the pretrained one, trying to obtain predictions all probabilities leads to none.

This strange behavior was firstly observed during predictions of specific semantic data types where many labels had a bias towards the first defined label. Digging deeper, when using predict_proba, a full set of nan probabilities was observed. I believe this is a bug.

Digging deeper, I found out that probably skewness & kurtosis for character level statistics are having nan as actual values. As these metrics have the standard deviation in the denominator of calculations this is a valid concern and issue.

This can be fixed in the code by adding fixed min/max values for computational reasons but I believe that this is something that has to be also taken into account when deriving complex features from metrics. This issue is not described I believe in the corresponding paper (https://arxiv.org/pdf/1905.10688.pdf) and probably it is an edge case that was missed by the authors.

This may also be the root cause behind issue#47 (#47).

Thanks a lot for the great model, OS code and contributions.

Bellow is an example of the aforementioned behavior just by changing the examples of the provided examples notebooks. This is the minimum reproducible example.
https://gist.github.com/stranger-codebits/6074b5fe2d02ac9db9f2750dbad9a24f

@madelonhulsebos
Copy link
Collaborator

Dear @stranger-codebits,

Thanks a lot for reporting your issue and findings, this is a great catch.
I hope to have time to look into this soon. In the meantime, feel welcome to file a PR with a fix, if you have implemented one!

Kind regards

@stranger-codebits
Copy link
Author

Are there any specific guides on how to open a PR, any tests that have to execute and so on? I will open a PR on the next days!

Kind regards,
Nikolaos

@madelonhulsebos
Copy link
Collaborator

madelonhulsebos commented Oct 4, 2022 via email

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

2 participants