You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/S3-CIMA/S3-CIMA-main/S3CIMA/modules_scima.py:246, in run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background)
244 for i in range(0, int(len(labels)/2)):
245 lab = str(labels[i])
--> 246 train_idx[lab] = list(np.random.choice(group[lab], size=ntrain_per_class, replace=False))
247 test_idx[lab] = [j for j in group[lab] if j not in train_idx[lab]]
248 rlab = str(labels[i + int(len(labels)/2)])
File mtrand.pyx:934, in numpy.random.mtrand.RandomState.choice()
ValueError: 'a' cannot be empty unless no samples are taken
The code in S3CIMA_example.ipynb runs successfully up until the line ms.run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background).
I've tried various approaches to fix this issue, but unfortunately, I haven't been able to resolve it. I would greatly appreciate any assistance or guidance you could provide.
Thank you very much!
Feel free to adjust any specific details as needed!
The text was updated successfully, but these errors were encountered:
Hi!
I'm making a concerted effort to replicate your impressive workflow, but I've encountered some difficulties that I can't resolve on my own.
I ran the following code:
python
Anchor = 'CD4+ T cells'
ntrain_per_class = 12
K = 50
k = 10
labels = ['1', '2', 'rand1', 'rand2']
classes = [0, 1, 2, 2]
path = '/'.join(os.path.abspath(os.getcwd()).split('/')[:-1]) + '/CRCs'
nrun = 50
nset_thr = 0.9
background = True
ms.run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background)
However, I keep encountering the following error:
ValueError Traceback (most recent call last)
Cell In[102], line 16
14 nset_thr = 0.9
15 background = True
---> 16 ms.run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background)
File ~/S3-CIMA/S3-CIMA-main/S3CIMA/modules_scima.py:246, in run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background)
244 for i in range(0, int(len(labels)/2)):
245 lab = str(labels[i])
--> 246 train_idx[lab] = list(np.random.choice(group[lab], size=ntrain_per_class, replace=False))
247 test_idx[lab] = [j for j in group[lab] if j not in train_idx[lab]]
248 rlab = str(labels[i + int(len(labels)/2)])
File mtrand.pyx:934, in numpy.random.mtrand.RandomState.choice()
ValueError: 'a' cannot be empty unless no samples are taken
The code in S3CIMA_example.ipynb runs successfully up until the line ms.run_scima(Anchor, ntrain_per_class, K, k, nset_thr, labels, classes, path, nrun, background).
I've tried various approaches to fix this issue, but unfortunately, I haven't been able to resolve it. I would greatly appreciate any assistance or guidance you could provide.
Thank you very much!
Feel free to adjust any specific details as needed!
The text was updated successfully, but these errors were encountered: