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
Predict function in _tree.pyx is comparing a float feature to a double threshold (node_value). The double threshold could be replaced by a float threshold using the following function:
Exactly the same results but with less memory consumption and maybe with some speed gain as no cast to double would be required when comparing both values.
Versions
Any version >= 020.
The text was updated successfully, but these errors were encountered:
@sdpython instead of node_value, do you mean node.threshold? I do not understand yet how the node's value (i.e. the prediction) relates to this threshold comparison.
Description
Predict function in _tree.pyx is comparing a float feature to a double threshold (node_value). The double threshold could be replaced by a float threshold using the following function:
More explanations: Tricky detail when converting a random forest from scikit-learn into ONNX.
Expected Results
Exactly the same results but with less memory consumption and maybe with some speed gain as no cast to double would be required when comparing both values.
Versions
Any version >= 020.
The text was updated successfully, but these errors were encountered: