Skip to content

fit_transform hangs for low number of samples #80

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

Closed
fredmell opened this issue Nov 13, 2024 · 3 comments
Closed

fit_transform hangs for low number of samples #80

fredmell opened this issue Nov 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@fredmell
Copy link

fredmell commented Nov 13, 2024

Hello,

Thank you for this great package! It seems like I have run into a bug with the most recent version.

fit_transform hangs indefinitely for n=30 and less. It runs fine for values larger than this.

import numpy as np
import pacmap 

n = 20
X = np.random.normal(size=(n, 512))

embedding = pacmap.PaCMAP(n_components=2) 

X_transformed = embedding.fit_transform(X)

print(X_transformed.shape)

It seems to have been introduced in 0.7.4, it runs to completion on 0.7.3.

Let me know if there is anything more I can provide.

@hyhuang00
Copy link
Collaborator

Thanks for reporting. I've replicated this error. I suspect this is a similar issue like #72 and will work on this as soon as possible.

@hadronzoo
Copy link
Contributor

hadronzoo commented Nov 16, 2024

This might be caused by the sample_FP function entering an infinite loop if n_samples > maximum - len(reject_ind) - !is_in(self_ind, reject_ind).

@hyhuang00 hyhuang00 added the bug Something isn't working label Nov 17, 2024
@hyhuang00
Copy link
Collaborator

Resolved in release 0.7.6. Please reopen this issue if you encountered this issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants