Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

random initial values for rotation matrix in GPA rotations

Aperta
#116 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
numpy, python
Ambito
data

Direzione di ricerca

Inizia in factor_analyzer/rotator.py, in Rotator._oblique, Rotator._orthogonal e Rotator._varimax, quindi controlla gli altri metodi di rotazione per verificare che usino la stessa inizializzazione. Verifica il comportamento attuale della matrice identità, definisci come random_state controlla l’inizializzazione ortogonale e conferma che il valore predefinito rimanga invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)

Lingua principale
Python
Stelle
6
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EducationalTestingService/factor_analyzer

Tutte le issue di EducationalTestingService/factor_analyzer

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.