Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`ICA` does not surface whether the decomposition converged

クローズ
#14,335 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@aslansd がすでに取り組んでいます。

2026年10月1日 から。

  • #14370 @aslansd による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start at the ICA _fit entry point and trace the fastica, infomax, and picard paths, then inspect how save() serializes fitted state. Confirm how convergence is currently reported and identify the persistence and test locations. Done means fitted ICA objects expose the result and retain it after saving and loading, including when fitting stops at max_iter.

索引モデルが issue の本文から書いたものです。

説明

Summary

After ica.fit(), ica.n_iter_ holds the iteration count and ica.max_iter
the limit, but there is no attribute saying whether fitting converged or
stopped at the limit. A user has to know to compare the two.

Why it matters

These are different results and they are not distinguishable in saved output.
An ICA that hit max_iter produces components that are still used to pick
ica.exclude, and the exclusions are then applied to the data. Nothing
downstream — not the cleaned Raw, not a saved -ica.fif — records that the
decomposition was truncated.

ica = mne.preprocessing.ICA(n_components=4, method='fastica',
                            random_state=97, max_iter=200)
ica.fit(raw)
ica.n_iter_ == ica.max_iter    # the only way to know, and easy not to check

MNE does warn at fit time, but a warning is not part of the object and does not
survive ica.save().

Suggestion

A converged_ boolean set during _fit, and included in what save() writes,
would make this checkable after the fact. Happy to open a PR if that would be
welcome, including for the infomax and picard paths.

Context

Noticed while writing an MNE adapter for
daftar. I am raising the same point with
three other packages that have the same pattern, so please read this as a
question about a shared convention rather than a complaint about MNE.

主要言語
Python
スター
3.6k
フォーク
1.6k
平均マージ
1日 11時間
マージ済み PR(30日)
82

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mne-tools/mne-python のほかの issue

mne-tools/mne-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。