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

random initial values for rotation matrix in GPA rotations

Abierto
#116 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
numpy, python
Área
data

Línea de trabajo

Comienza en factor_analyzer/rotator.py, en Rotator._oblique, Rotator._orthogonal y Rotator._varimax; después, revisa los otros métodos de rotación para comprobar que usan la misma inicialización. Verifica el comportamiento actual de la matriz identidad, define cómo random_state controla la inicialización ortogonal y confirma que el valor predeterminado no cambia.

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

Descripción

Hi all. First, thanks so much to the devs of factor_analyzer. It's a fantastic and much needed package!

Is your feature request related to a problem? Please describe.

As has been pointed out, the GPA rotation methods often converge to local minima (Browne, 2001; Bernaards & Jennrich, 2005; Nguyen & Waller, 2022). As such, it's been recommended researchers initialize the GPA from many starting values when searching for a global minimum. I'm wondering if the Rotator class could be amended in order to allow initializing the GPA from different starting values.

Describe the solution you'd like

One simple solution would be for the Rotator class to accept a new argument, random_state, which defaults to None. When random_state = None, the rotation matrix is initialized with np.eye(n_cols) as is currently implemented (L326, L416, L493). When a user specifies a seed, however, the rotation matrix is initialized as a random orthogonal matrix from scipy.stats.ortho_group. That is,:

# initialize the rotation matrix
_, n_cols = loadings.shape
if self.random_state == None:
    rotation_matrix = np.eye(n_cols)
else:
    rotation_matrix = sp.stats.ortho_group(dim=n_cols, seed=self.random_state).rvs()

A solution like the above could be added to the Rotator._oblique, Rotator._orthogonal, Rotator._varimax methods (and any others that I missed).

Apologies in advance if the above is already possible and I've simply missed how. If the above sounds like it may be useful, I'd be happy to attempt a PR.

All the best,
Sam (@szorowi1)

Lenguaje dominante
Python
Estrellas
6
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 EducationalTestingService/factor_analyzer

Todos los issues de EducationalTestingService/factor_analyzer

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.