You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the non linear DAGRegressor very different results are returned depending on whether prediction data is provided as float or int. See example below.
Context
When writing unit tests for a project that uses causalnex I provided the prediction data as an int, this gave an unexpected results. As I did not expect the data type to cause this issue it took several hours to debug.
Hello Nick,
Thanks for raising this issue, this should definitely not be the case and I feel your frustration for bugfixing 😓 !
I much appreciate the example, I put it into a unit test :)
Had a quick look and it seems like its due to some numpy dtype behaviour that was not taken into account (and I personally didnt know either) If a numpy array has dtype int, assigning a float to a column will make it lose the decimals because you dont overwrite the dtype.
I have a local fix and will push it as part of our upcoming v0.11 release in the next days.
Description
When using the non linear DAGRegressor very different results are returned depending on whether prediction data is provided as float or int. See example below.
Context
When writing unit tests for a project that uses causalnex I provided the prediction data as an int, this gave an unexpected results. As I did not expect the data type to cause this issue it took several hours to debug.
Steps to Reproduce
Expected Result
ints and floats provided to predict should yield the same result, i.e. providing 0.0 or 0, should yield the same result.
Actual Result
See example above.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
The text was updated successfully, but these errors were encountered: