Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PCA fitting can overflow LAPACK's 32-bit indexing when fitting all spikes

Đang mở
#4,868 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kushaangupta đang làm issue này rồi.

Từ ngày 14/10/2026.

  • #4869 của @kushaangupta — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
numpy, python
Lĩnh vực
data-engineering

Hướng nghiên cứu

Start in spikeinterface/postprocessing/principal_component.py at _fit_by_channel_global, where all waveforms for one unit are concatenated and passed to a single pca_model.partial_fit call that runs a LAPACK SVD. Reproduce with a large unit (the sizes in the traceback exceed 2^31 elements) and check whether the batching in the incremental fit can be split into chunks. Done means the call completes on the large unit without the LAPACK overflow and the existing PCA tests still pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

postprocessing

I was trying to compute the PCA features of a big dataset

analyzer.compute("random_spikes", method="all")
analyzer.compute("waveforms")
analyzer.compute("principal_components", n_components=3, mode="by_channel_global")

but apparently in the backend sklearn PCA has an inherent indexing limit

spikeinterface/postprocessing/principal_component.py, _fit_by_channel_global
    pca_model.partial_fit(wfs_concat)
sklearn/decomposition/_incremental_pca.py, partial_fit
    U, S, Vt = linalg.svd(X, full_matrices=False, check_finite=False)
scipy/linalg/_decomp_svd.py, svd
ValueError: Indexing a matrix of 2194566000 elements would incur an in integer overflow in LAPACK. Try using numpy.linalg.svd instead.

I see SpikeInterface already uses IncrementalPCA, but _fit_by_channel_global() combines all waveforms for one unit, reshapes spike/channel pairs into PCA rows, and passes the entire matrix to a single partial_fit() call. Each call still runs an SVD. A large unit can therefore exceed the 32-bit LAPACK indexing limit even when incremental fitting is used across units.

Ngôn ngữ chính
Python
Star
859
Fork
286
Merge trung bình
3 ngày 16 giờ
Pull request đã merge (30 ngày)
52

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SpikeInterface/spikeinterface

Tất cả issue của SpikeInterface/spikeinterface

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.