Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

random initial values for rotation matrix in GPA rotations

オープン
#116 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
numpy, python
領域
data

調査の方向性

factor_analyzer/rotator.py の Rotator._oblique、Rotator._orthogonal、Rotator._varimax から始め、他の回転メソッドについても同じ初期化になっているか確認してください。現在の単位行列の挙動を検証し、random_state が直交初期化をどのように制御するかを定義し、デフォルトが変更されないことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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)

主要言語
Python
スター
6
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EducationalTestingService/factor_analyzer のほかの issue

EducationalTestingService/factor_analyzer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。