Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jiazhao97 authored Nov 19, 2021
1 parent 7483cb6 commit 10b38e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ def integrate_datasets(lowdim_list, # list of low-dimensional representations

def calculate_mixing_metric(data, meta, methods, k=5, max_k=300, subsample=True):
if subsample:
if data.shape[0] >= 1e5:
if data.shape[0] >= 1e4:
np.random.seed(1234)
subsample_idx = np.random.choice(data.shape[0], 50000, replace=False)
subsample_idx = np.random.choice(data.shape[0], 10000, replace=False)
data = data[subsample_idx]
meta = meta.iloc[subsample_idx]
meta.index = np.arange(len(subsample_idx))
Expand Down

0 comments on commit 10b38e2

Please sign in to comment.