EducationalTestingService / EducationalTestingService/factor_analyzer
get_factor_variance() returns ndarray which is not ordered by variance.
- Vorherrschende Sprache
- Python
- Sterne
- 6
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
When i print the variance of the factors with get_factor_variance(), the variance is not monotonically decreasing. In my understanding each additional factor should explain less and less variance. The variance of my 15 factors looks like this (notice the values marked in bold):
[12.69, 5.32, 2.7, 2.6, 2.26, 2.08, 1.76, **2.54**, **2.4**, 1.69, 1.49, **2.06**, 1.16, 1.15, **1.45**]
````
n_factors = 15
fa = FactorAnalyzer(n_factors, rotation="varimax", method='principal', use_smc=True)
fa.fit(X)
print(pd.DataFrame(fa.get_factor_variance(),index=['Variance (sum of squared loadings)','Proportional Var','Cumulative Var']))
````
I cannot provide you with the data X
Expected behavior: the output should be sorted by decreasing variance
- OS: macOS
- Python: 3.11
- Versions for `factor_analyzer` / `numpy` / `scipy` / `pandas`: newest
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne am Einstiegspunkt get_factor_variance() und untersuche, wie die Faktorvarianz berechnet und geordnet wird. Verwende das FactorAnalyzer-Beispiel des Issues mit einem lokalen Datensatz, um die nicht monotone Ausgabe zu reproduzieren; abgeschlossen ist die Untersuchung, wenn die zurückgegebenen Varianzwerte abnehmen, während die proportionalen und kumulativen Zeilen konsistent bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100