跳转至

因子分析#

from factor_analyzer import FactorAnalyzer
f=FactorAnalyzer(n_factors = 10, rotation='varimax')
f.fit(data)

FactorAnalyzer 主要参数

  • n_factors: 设置因子的个数
  • rotation: 表示旋转的个数,如果不设置的话默认不进行旋转。可旋转的旋转方法有:varimax, promax。。。

输出结果属性包括:

  • loadings_ 因子载荷矩阵
  • rotation_matrix 旋转矩阵
  • structure: The structure loading matrix.
  • get_factor_variance() 计算因子的方差信息,包括方差、方差的比例,以及累计方差比重

获取转换后的数据矩阵

f.transform(data)

参考#

https://pypi.org/project/factor-analyzer/
https://blog.csdn.net/hfutxiaoguozhi/article/details/78840126
https://factor-analyzer.readthedocs.io/en/latest/factor_analyzer.html#module-factor_analyzer.factor_analyzer