Weighted EVREG feature selection algorithm#39
Open
Top1Miami wants to merge 4 commits intoctlab:developfrom
Open
Weighted EVREG feature selection algorithm#39Top1Miami wants to merge 4 commits intoctlab:developfrom
Top1Miami wants to merge 4 commits intoctlab:developfrom
Conversation
LastShekel
requested changes
Jan 10, 2021
|
|
||
| def weighted_evidential_regression(X, y, alpha=0.01, num_epochs=1000, p=2, k=None, radius=5.0): | ||
| """ | ||
| Calculates anova measure for each feature. |
| np.sum([__y_derivative(X, i, weights, p, radius, y) for i in range(X.shape[0])], axis=0) | ||
|
|
||
|
|
||
| def weighted_evidential_regression(X, y, alpha=0.01, num_epochs=1000, p=2, k=None, radius=5.0): |
Collaborator
There was a problem hiding this comment.
Does it a filter algorithm?
Not embedded one?
Contributor
Author
There was a problem hiding this comment.
Yes it is more of an embedded method, but it fits better the pipeline of univariate filter, as it needs cutting rule and provides feature metric that can be used as a rank.
� Conflicts: � ITMO_FS/filters/univariate/__init__.py
LastShekel
requested changes
Mar 22, 2021
Collaborator
LastShekel
left a comment
There was a problem hiding this comment.
Delete pandas from requirements
| return sum(abs((first - second) * weights) ** p) ** (1.0 / p) | ||
|
|
||
|
|
||
| def __rbf(distance, radius): |
Collaborator
There was a problem hiding this comment.
Its probably better to put these functions into utils or somewhere
| self.k = int(0.1 * X.shape[0]) | ||
| if self.k < 1: | ||
| self.k = X.shape[0] - 1 | ||
| print(self.k) |
Collaborator
There was a problem hiding this comment.
This should go to log or get deleted
| >>> y = np.array([1, 2, 3, 4, 5], dtype=np.integer) | ||
| >>> weighted_ev_reg = WeightedEvReg(cutting_rule=('K best', 2), num_epochs=100) | ||
| >>> weighted_ev_reg.fit(X, y) | ||
| >>> print(weighted_ev_reg.selected_features_) |
Collaborator
There was a problem hiding this comment.
do not print this
and check this test with pytest
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.
Pull Request Template
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests or set link to that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Just a basic run unit test - test_weighted_evreg in univariate_filter_test.
Checklist: