Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster label size #11

Open
renjiaxu opened this issue Feb 28, 2024 · 1 comment
Open

Cluster label size #11

renjiaxu opened this issue Feb 28, 2024 · 1 comment

Comments

@renjiaxu
Copy link

renjiaxu commented Feb 28, 2024

Hello, thank you very much for your work!

When I called the "best_map (L1, L2)" method in utils.py, I found that the clustering label size was larger than the groundtruth label, resulting in

  for i in range (nClass2):
        newL2 [L2==Label2 [i]]=Label1 [c [i]] 

statement cannot be executed properly.

The error message is as follows

Traceback (most recent call last):
 File "E:\python\workProject\scMDC\scMDC-master\src\run_scMDC.py", line 227, in <module>  y_pred_ = best_map(y, y_pred) - 1
 File "E:\python\workProject\scMDC\scMDC-master\src\utils.py", line 91, in best_map newL2[L2 == Label2[i]] = Label1[c[i]]
 IndexError: index 8 is out of bounds for axis 0 with size 6

Can you tell me where the problem is? Thank you

@xianglin226
Copy link
Owner

Hi, thank you for pointing this problem out. In some special cases, the predicted cluster number (k) is lower than the defined k. If you really need the best map, could you try to adjust (such as increase) the defined K to produce more clusters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants