Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`ICA` does not surface whether the decomposition converged

Cerrado
#14,335 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@aslansd ya está trabajando en esto.

Desde el 1/10/2026.

  • #14370 de @aslansd — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
3.6k
Forks
1.6k
Merge medio
1 d 11 h
PR fusionados (30 d)
82

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mne-tools/mne-python

Todos los issues de mne-tools/mne-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.