get_factor_variance() returns ndarray which is not ordered by variance.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start at the get_factor_variance() entry point and inspect how factor variance is calculated and ordered. Use the issue's FactorAnalyzer example with a local dataset to reproduce the non-monotonic output; done means the returned variance values decrease while the proportional and cumulative rows remain consistent.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EducationalTestingService/factor_analyzer
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
EducationalTestingService/factor_analyzer#148 · 4 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
EducationalTestingService/factor_analyzer#147 · 1 reaction ·
-
Order of variables when DF is fed to fit with CFA: either document or actually use the column names? Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
EducationalTestingService/factor_analyzer#146 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
EducationalTestingService/factor_analyzer#145 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in EducationalTestingService/factor_analyzer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·