random initial values for rotation matrix in GPA rotations
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu trong factor_analyzer/rotator.py tại Rotator._oblique, Rotator._orthogonal và Rotator._varimax, sau đó kiểm tra các phương thức xoay khác để xác nhận chúng sử dụng cùng cách khởi tạo. Xác minh hành vi hiện tại của ma trận đơn vị, xác định cách random_state điều khiển việc khởi tạo trực giao và xác nhận rằng giá trị mặc định vẫn không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 6
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của EducationalTestingService/factor_analyzer
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
EducationalTestingService/factor_analyzer#148 · 4 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 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? Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
EducationalTestingService/factor_analyzer#146 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
EducationalTestingService/factor_analyzer#145 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Tất cả issue của EducationalTestingService/factor_analyzer
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·