Skip to content

[FIX] Regression Tree Sparse Support#2497

Merged
nikicc merged 2 commits into
biolab:masterfrom
jerneju:sparse-tree-regression
Jul 26, 2017
Merged

[FIX] Regression Tree Sparse Support#2497
nikicc merged 2 commits into
biolab:masterfrom
jerneju:sparse-tree-regression

Conversation

@jerneju
Copy link
Copy Markdown
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
Copy Markdown
Contributor

nikicc commented Jul 26, 2017

Related to #2370.

@nikicc nikicc self-assigned this Jul 26, 2017
Copy link
Copy Markdown
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.

Comment thread Orange/regression/tree.py Outdated
datax = datax.toarray()
mapping, branches = MappedDiscreteNode.branches_from_mapping(
data.X[:, attr_no], mapping, len(attr.values))
datax, mapping, len(attr.values))
Copy link
Copy Markdown
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?

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

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