PCA fitting can overflow LAPACK's 32-bit indexing when fitting all spikes
Maintainer thường phản hồi trong vòng 1 ngày
Đá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ả
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SpikeInterface/spikeinterface
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
SpikeInterface/spikeinterface#4842 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
SpikeInterface/spikeinterface#4756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SpikeInterface/spikeinterface#4510 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
SpikeInterface/spikeinterface#4860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
SpikeInterface/spikeinterface#4859 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SpikeInterface/spikeinterface
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SwiftKickMobile/skai#84 ·
-
Lychee link check failedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jxxghp/MoviePilot#7070 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flop-labs/technocore-chat#997 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
doronz88/pymobiledevice3#2051 ·
Maintainer thường phản hồi trong vòng 1 ngày