-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Regression Tree Sparse Support #2497
Conversation
Related to #2370. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be working for me.
Orange/regression/tree.py
Outdated
mapping, branches = MappedDiscreteNode.branches_from_mapping( | ||
data.X[:, attr_no], mapping, len(attr.values)) | ||
datax, mapping, len(attr.values)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we use col_x
here?
model_sparse = self.get_output("Model") | ||
self.assertTrue(np.array_equal(model_dense._code, model_sparse._code)) | ||
self.assertTrue(np.array_equal(model_dense._thresholds, model_sparse._thresholds)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed from test_sparse_data_classification
? Is this not relevant for regression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think this is fixed in #2496.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it didn't fail before for classification, if it was among tests, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before did not fail since the test did not run properly. Sparse table had never been sent to the widget.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see.
Codecov Report
@@ Coverage Diff @@
## master #2497 +/- ##
==========================================
+ Coverage 74.53% 74.54% +0.01%
==========================================
Files 321 321
Lines 56134 56149 +15
==========================================
+ Hits 41838 41856 +18
+ Misses 14296 14293 -3 |
Issue
Regression Tree Sparse Support
Description of changes
Includes