Open scottgigante opened 4 years ago
distances, _ = sklearn.NearestNeighbors(n_neighbors=3).fit(X).kneighbors()
distances = distances.max(axis=1)
p = distances / distances.sum()
X_subsample = scprep.select.select_rows(X, idx=np.random.choice(X.shape[0], n, p=p, replace=False)
Describe the solution you'd like scprep.select.subsample(density=True, knn=3). Use nmslib if available?
Describe alternatives you've considered Use sklearn.NearestNeighbors