ENH Multiview axis-aligned more like sklearn #241
Closed
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.
Related to #226 and #235
The multi-view axis-aligned splitter used the inheritance scheme of oblique splitters to implement the method for sampling multiple feature sets. However, this comes with some downsides. It does not track constant features and inherently requires you to sample unnecessarily a projection vector within each split node.
Tracking constants can help improve runtime as during DFS/BFS building of the tree, subtrees are not explored if all are constant. Moreover, not sampling a projection vector may help the segfault issue related to RAM spikes due to constantly initializing and pushing indices/weights related to the projection.
Changes proposed in this pull request:
n_total_constant_features
per split node, which is passed to the tree, which is then passed back to its children nodes. This is a bit hackyn_constant_features
fromsplitter.node_split(...)
, and assigns it into the splitrecord. We probably want some kind of unit-tests to ensure this works properly, similar to scikit-learn's existing constant feature tree testsBefore submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.After submitting