jmschrei / apricot

apricot implements submodular optimization for the purpose of selecting subsets of massive data sets to train machine learning models quickly. See the documentation page: https://apricot-select.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Row indices

amirsani opened this issue · comments

How can I get the indices for the selected rows/samples? At the moment I have to run the specific function with the number of samples set to the shape of the matrix and get the indices by ranking the gains.

Thank you for the great package!

Howdy!

You can use selector.ranking to get the ranking. selector.ranking[0] is the first selected item, with selector.gains[0] being the gain of adding that element in, selector.ranking[1] is the second selected item with selector.gains[1] being the gain in adding that element in, etc. The gains vector does not match the original data set but the selected items.

Thanks! I should have looked at the ranking values more closely.