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

fix bug for partial_fit when the number of batch samples is less than n_comp #3313

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DingWB
Copy link

@DingWB DingWB commented Oct 23, 2024

  • Closes #
  • Tests included or not required because: n_components must be less or equal to the number of samples, otherwise it would throw an error, for example, ValueError: n_components=100 must be less or equal to the batch number of samples 40. This error usually happens on the last chunk of the partial_fit.
  • Release notes not necessary because:

For example, my adata.shape[0] is 1041 and I run IncrementalPCA sc.tl.pca(adata, n_comps=100, chunked=True,chunk_size=1000), and I got an error: ValueError: n_components=100 must be less or equal to the batch number of samples 40 on scanpy/preprocessing/_pca.py:256

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

Successfully merging this pull request may close these issues.

1 participant