[FIX] Regression Tree Sparse Support#2497
Merged
Merged
Conversation
Contributor
|
Related to #2370. |
nikicc
reviewed
Jul 26, 2017
Contributor
nikicc
left a comment
There was a problem hiding this comment.
This seems to be working for me.
| datax = datax.toarray() | ||
| mapping, branches = MappedDiscreteNode.branches_from_mapping( | ||
| data.X[:, attr_no], mapping, len(attr.values)) | ||
| datax, mapping, len(attr.values)) |
Contributor
There was a problem hiding this comment.
Couldn't we use col_x here?
| self.send_signal("Data", table2) | ||
| 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)) |
Contributor
There was a problem hiding this comment.
Why is this removed from test_sparse_data_classification ? Is this not relevant for regression?
Contributor
There was a problem hiding this comment.
But it didn't fail before for classification, if it was among tests, right?
Contributor
Author
There was a problem hiding this comment.
Before did not fail since the test did not run properly. Sparse table had never been sent to the widget.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Regression Tree Sparse Support
Description of changes
Includes