-
Notifications
You must be signed in to change notification settings - Fork 170
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
Decision tree C code exported by porter has wrong datatype for features array it should be float #43
Comments
Can you please provide some data and code for comparison? (There is a bigger difference between the internal and textual representation of values in Python I guess.) |
ok I will provide detail example/data tomorrow. |
attaching zip file contains
test script output at my end
|
Okay, thanks. Can you please validate the data type of your training data? print(type(X[0])) # <type 'numpy.float32'> or <type 'numpy.float64'> For load_digits it's Nevertheless it depends on the data. In general I see the problem of point precisions between data types and programming languages. It could make sense to add a possibility to change the features data type in transpiled output by using a new argument Further Can you test it? |
C code exported by porter has wrong data type for feature value as double which will cause accuracy percentage.
scikit-learn code
porter C Code:
The text was updated successfully, but these errors were encountered: