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

Added CKernelDependenceMaximization and CBAHSIC in feature selection framework #2363

Merged
merged 2 commits into from Jul 5, 2014

Conversation

lambday
Copy link
Member

@lambday lambday commented Jul 3, 2014

Addition/changes are:

  • Added feature selection to modular interface
  • Pushed apply_backward_elimination() method from public to protected. This is done to prevent unexpected results if someone calls this on, for example, an instance of FOHSIC. This shouldn't be allowed. This has to be done by public API via CFeatureSelection::apply() call.
  • Added temporary conversion of CLabels instance to CFeatures instance in CDependenceMaximization::set_labels() instead of CDependenceMaximization::precompute(). In case one just wants to observe the measures via public CFeatureSelection::compute_measures() call for experimental purpose, he should be able to do that without having to go through precompute() which is for internal purpose.
  • Unit-tests for the public API

@lambday
Copy link
Member Author

lambday commented Jul 3, 2014

@karlnapf @sejdino please have a look. I will add a python modular (as integration test) and libshogun examples for this next and compare it with other implementations. I'll think a bit about how to implement CFeatures::copy_dimension_subset() in a better way, because copying to new memory all the time is time consuming.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.12%) when pulling 13377b7 on lambday:feature/selection into b95d9a7 on shogun-toolbox:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) when pulling 97911c0 on lambday:feature/selection into b95d9a7 on shogun-toolbox:develop.

@@ -21,6 +21,7 @@
%newobject get_transposed();
%newobject create_merged_copy(CFeatures* other);
%newobject copy_subset(SGVector<index_t> indices);
%newobject copy_dimension_subset(SGVector<index_t> indices);
Copy link
Member

Choose a reason for hiding this comment

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

sure this thing even needs to be exposed to modular ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@karlnapf ummm.. well, its in public API of CFeatures.. so.. But since we have kept num_features thing out of CFeatures since it doesn't make sense for all feature types, maybe this method should not be here at all. Maybe a helper method in CFeatureSelection should handle it, like CFeatureSelection::get_num_features. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

mmmh, no hiding in in such a specialised class is not a good idea. then rather keep it public and expose it. i just though nobody might ever call this, so rather hide to not confuse people. but maybe actually somebody wants to call it, so keep this stuff, sorry for the confusion :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@karlnapf well I thought that since our last discussion with @vigsterkr and @sonney2k regarding this num_feature thing, having a copy_dimension_subset in CFeatures would ultimately result in this method being unimplemented in all feature classes except for CDenseFeatures and CSparseFeatures :(

@karlnapf
Copy link
Member

karlnapf commented Jul 5, 2014

this is fine to merge!
well done! time for some examples soon i guess :)

karlnapf added a commit that referenced this pull request Jul 5, 2014
Added CKernelDependenceMaximization and CBAHSIC in feature selection framework
@karlnapf karlnapf merged commit 80287f4 into shogun-toolbox:develop Jul 5, 2014
@lambday
Copy link
Member Author

lambday commented Jul 6, 2014

@karlnapf thanks for merging. I will add example in the next patch and also start a notebook on feature selection in shogun.

@karlnapf
Copy link
Member

karlnapf commented Jul 6, 2014

cool! we are getting there!

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.

None yet

3 participants