`BenchmarkStudy.create` reuses the main channels of another dataset

Đang mở Phù hợp với người mới
#4,990 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu tại benchmark/benchmark_base.py, ở BenchmarkStudy.create, và theo dõi cách main_channel_indices được thiết lập trước khi truyền vào create_sorting_analyzer. Issue cung cấp ví dụ tái hiện sử dụng SorterStudy.create với một dataset thiếu gt_unit_locations; trước tiên hãy chạy ví dụ đó và kiểm tra các chỉ số kênh của analyzer. Hoàn tất khi mỗi dataset nhận được các kênh chính phù hợp và có một regression test bao quát trường hợp thiếu thuộc tính.

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

Mô tả

I found this while reading benchmark/benchmark_base.py, not in my own analyses, so this is a "for the sake of improvement" report.

In BenchmarkStudy.create, main_channel_indices is only set when the ground truth sorting has the gt_unit_locations property, but it is always passed to create_sorting_analyzer (since #4734). A dataset without this property gets the main channels of the previous dataset, or an UnboundLocalError if it is the first one. The sparsity, templates and SNR are then wrong without an error.

import tempfile
from pathlib import Path
from spikeinterface.core import generate_ground_truth_recording
from spikeinterface.benchmark import SorterStudy

if __name__ == "__main__":
    datasets = {}
    for key, seed in (("a", 0), ("b", 5)):
        datasets[key] = generate_ground_truth_recording(num_channels=32, num_units=4, durations=[10.0], seed=seed)
    datasets["b"][1].delete_property("gt_unit_locations")
    cases = {key: {"label": key, "dataset": key, "params": {"sorter_name": "simple"}} for key in datasets}
    study = SorterStudy.create(Path(tempfile.mkdtemp()) / "study", datasets=datasets, cases=cases)
    print(study.analyzers["a"].main_channel_indices, study.analyzers["b"].main_channel_indices)

Both datasets get the same main channels. Fix: set main_channel_indices = None in the else branch, so that they are estimated. I have this locally with a test. Should I open a PR, or would you rather fix it yourselves?

Ngôn ngữ chính
Python
Star
883
Fork
291
Merge trung bình
3 ngày 17 giờ
Pull request đã merge (30 ngày)
40

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.