-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
【Python】Floating-point precision of the split node #5298
Comments
How do you limit floating point precision in Python? |
166.6667 < 166.666702 Should be a yes node. Or am I missing something? |
Floating point printing is a very tricky thing, it has round off:
And the round off mode is dependent on implementation. |
Also 1.0.2 is now out. Feel free to try the experimental JSON format. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have encountered an unusual situation:
A model shows the split point for a particular node as follows:
4:[f21<166.666702] yes=9,no=10,missing=9
If I feed in an observation where f21 = 166.6667 the python model incorrectly sends this to the yes node. I've limited the number of floating-point numbers in Python to four decimal places.
The text was updated successfully, but these errors were encountered: