Skip to content
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

Merged
merged 2 commits into from
Jul 26, 2017
Merged

[FIX] Regression Tree Sparse Support #2497

merged 2 commits into from
Jul 26, 2017

Conversation

jerneju
Copy link
Contributor

@jerneju jerneju commented Jul 26, 2017

Issue

Regression Tree Sparse Support

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@jerneju jerneju added the DH2017 label Jul 26, 2017
@nikicc nikicc added this to the 3.4.5 milestone Jul 26, 2017
@nikicc
Copy link
Contributor

nikicc commented Jul 26, 2017

Related to #2370.

@nikicc nikicc self-assigned this Jul 26, 2017
Copy link
Contributor

@nikicc nikicc left a 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.

mapping, branches = MappedDiscreteNode.branches_from_mapping(
data.X[:, attr_no], mapping, len(attr.values))
datax, mapping, len(attr.values))
Copy link
Contributor

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))
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it fails.

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@codecov-io
Copy link

codecov-io commented Jul 26, 2017

Codecov Report

Merging #2497 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            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

@nikicc nikicc merged commit c48dcd3 into biolab:master Jul 26, 2017
@jerneju jerneju deleted the sparse-tree-regression branch July 26, 2017 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants