73675264dd48387319f62780b52d81389016cc1f,neurosynth/base/dataset.py,FeatureTable,get_features_by_ids,#FeatureTable#Any#Any#Any#Any#,602
Before Change
def get_features_by_ids(self, ids=None, threshold=0.0001, func="sum", get_weights=False):
""" Returns features that mach to ids"""
id_indices = np.in1d(self.ids, ids)
data = self.data.toarray()
ids_weights = reduce(lambda x,y: x+y, data[id_indices,:])/len(id_indices)
above_thresh = (ids_weights >= threshold)
features_to_keep = np.array(self.feature_names)[np.where(above_thresh)]
After Change
is >= threshold. """
weights = self.data.ix[ids].apply(func, 0)
above_thresh = weights[weights >= threshold]
return above_thresh if get_weights else list(above_thresh.index)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: neurosynth/neurosynth
Commit Name: 73675264dd48387319f62780b52d81389016cc1f
Time: 2014-03-24
Author: tyarkoni@gmail.com
File Name: neurosynth/base/dataset.py
Class Name: FeatureTable
Method Name: get_features_by_ids
Project Name: biotite-dev/biotite
Commit Name: a50f342c2a51fab77061990d198dde8266c28320
Time: 2020-10-21
Author: tom.mueller@beachouse.de
File Name: src/biotite/structure/filter.py
Class Name:
Method Name: filter_nucleotides
Project Name: scikit-image/scikit-image
Commit Name: e3cba47cac279d7d810b1bfe7b88d2f5eb8227b7
Time: 2019-05-14
Author: juan.nunez-iglesias@monash.edu
File Name: skimage/morphology/_skeletonize.py
Class Name:
Method Name: skeletonize