スパース推定に基づく...
TRANSCRIPT
スパース推定に基づく 構造方程式モデリング
九州大学 マス・フォア・インダストリ研究所理化学研究所 革新知能統合研究センター
廣瀬 慧2019年12月19日
令和 元年度 横浜国立大学 COI サテライト シンポジウム
数学 理科 英語社会
文系
国語
理系
・潜在変数を含む最も基礎的なモデル・観測変数間の因果関係は仮定しない
因子分析モデル
• 従来は心理学・社会科学に使われていたが,最近は医学やマーケティングで広く使われている.
• 変数(項目数)が多いとき,似た変数が一つの(観測されない)変数で説明できるので,次元圧縮にもなる.
• 大量欠損データにも応用可能- Netflixやamazonのレコメンデーションへとつながる
‣ amazonの製品の数は莫大だが,多くのユーザーは同じような製品を買う.
因子分析
大量欠損時にも使える
モデル
…: 次元観測変数ベクトル: 次元潜在変数ベクトル
: 因子負荷行列: 次元独自因子ベクトル
観測変数の次元: , 因子数:
正則化は因子回転の一般化
STEP 1&2 を修正し,スパース性を強める (Hirose and Yamamoto, 2015)
: 正則化パラメータ
( )従来の推定:
: 罰則項
正則化対数 尤度関数!
スパース推定
subject to
Lasso (Least absolute shrinkage and selection operator; Tibshirani, 1996, JRSSB)
スパース推定
�̂ =
0
BBBBBBBBBBBBB@
�̂1
�̂2
�̂3...�̂j...
�̂p�1
�̂p
1
CCCCCCCCCCCCCA
=
0
BBBBBBBBBBBB@
0.250.000.00...
0.00...
0.120.00
1
CCCCCCCCCCCCA
�̂lasso = argmin�
ky �X�k2
y : n 次元目的変数ベクトル� : p 次元未知パラメータ : 計画行列X
・n < pでも使える ・凸最適化問題なので高速 ・パラメタ t はCVで選択可能
MC+ family
γ =1.1
γ =1.5
γ =10
γ =100
LassoHard threshold
Prenet正則化
Prenet (Product-based elastic net) penalty (Hirose and Terada, 2018)
P (�) =p�
i=1
m�1�
j=1
�
k>j
��|�ij ||�ik| +
1
2(1 � �)�2
ij�2ik
�0 < � � 1where
Elastic net
Figure 1: Penalty functions of the prenet (left-hand side) and the elastic net (right-hand
side) with ! = 0.7.
which is a hybrid of the lasso penalty (first term) and the ridge penalty (second term).
Although the prenet penalty and the elastic net penalty are similar, there is a fundamental
di!erence between these two penalties; the elastic net is based on the sum of the functions
of components, but the prenet is based on the product of a pair of parameters.
Figure 2 shows the penalty functions of the prenet (P (x, y) = !|x||y|+(1! !)x2y2/2)
and the elastic net (P (x, y) = !(|x|+ |y|)+ (1!!)(x2+ y2)/2) when ! = 0.7. Clearly, the
prenet penalty is a nonconvex function. A significant di!erence between the prenet and
the elastic net is that although the prenet penalty becomes zero when either x or y attains
zero, the elastic net penalty becomes zero only when both x = 0 and y = 0. Therefore,
for a two-factor model, either "i1 or "i2 tends to be close to zero with the prenet penalty,
which leads to a perfect simple structure. On the other hand, the elastic net tends to
produce estimates in which both "i1 and "i2 are small.
With the prenet penalty, the second term of (3) allows the estimation of the simplicity
of the loading matrix. However, the second term of the elastic net penalty in (4) (i.e.,
ridge penalty) does not contribute in any way to the estimation of the simplicity of the
6
Prenet
�(|x| + |y|) + (1 � �)(x2 + y2)/2�|x||y| + (1 � �)x2y2/2
Prenet正則化
Prenet (Product-based elastic net) penalty (Hirose and Terada, 2018)
P (�) =p�
i=1
m�1�
j=1
�
k>j
��|�ij ||�ik| +
1
2(1 � �)�2
ij�2ik
�0 < � � 1where
Elastic net
Figure 1: Penalty functions of the prenet (left-hand side) and the elastic net (right-hand
side) with ! = 0.7.
which is a hybrid of the lasso penalty (first term) and the ridge penalty (second term).
Although the prenet penalty and the elastic net penalty are similar, there is a fundamental
di!erence between these two penalties; the elastic net is based on the sum of the functions
of components, but the prenet is based on the product of a pair of parameters.
Figure 2 shows the penalty functions of the prenet (P (x, y) = !|x||y|+(1! !)x2y2/2)
and the elastic net (P (x, y) = !(|x|+ |y|)+ (1!!)(x2+ y2)/2) when ! = 0.7. Clearly, the
prenet penalty is a nonconvex function. A significant di!erence between the prenet and
the elastic net is that although the prenet penalty becomes zero when either x or y attains
zero, the elastic net penalty becomes zero only when both x = 0 and y = 0. Therefore,
for a two-factor model, either "i1 or "i2 tends to be close to zero with the prenet penalty,
which leads to a perfect simple structure. On the other hand, the elastic net tends to
produce estimates in which both "i1 and "i2 are small.
With the prenet penalty, the second term of (3) allows the estimation of the simplicity
of the loading matrix. However, the second term of the elastic net penalty in (4) (i.e.,
ridge penalty) does not contribute in any way to the estimation of the simplicity of the
6
Prenet
�(|x| + |y|) + (1 � �)(x2 + y2)/2�|x||y| + (1 � �)x2y2/2
Prenetは変数クラスタリングができるk-meansの一般化であることが示される!
• 因子負荷行列の各行に非ゼロ要素が最大で1つ
• 解釈が容易 • 変数クラスタリングに対応 ‣ k-meansの一般化
F1 F2 F3 F4* 0.00 0.00 0.00* 0.00 0.00 0.00* 0.00 0.00 0.00* 0.00 0.00 0.000.00* 0.00 0.000.00* 0.00 0.000.00* 0.00 0.000.00* 0.00 0.000.00* 0.00 0.000.00 0.00* 0.000.00 0.00* 0.000.00 0.00* 0.000.00 0.00* 0.000.00 0.00 0.00*0.00 0.00 0.00*0.00 0.00 0.00*0.00 0.00 0.00*
10完全単純構造
R Package “fanc”
• Factor Analysis via Non-Convex Penalty - MC, Prenetペナルティを用いた正則化最尤推定を行う.
• CRANからダウンロード可能 - https://cran.r-project.org/package=fanc
• 従来のパッケージとの違い
- fancは正則化最尤法を実行する.
‣ 従来の関数(factanal, faなど)はペナルティのない最尤法しか行わない.
- グラフィカルツールによって調整パラメータ ρ, γ を選択できる
プロット
図のPDF 出力ボタン
Overview画面表示 ボタン
$loadingsの中身を表示するボタン
out関数の結果表示ボタン
チューニングパラメータ(スクロールバーで調整)適合度・モデル評価基準
fancの強み
• 高次元小標本データに対しても安定して推定することができる.
• 主観でモデルを選び,選ばれたモデルの適合度からモデルの良さを評価することができる.
- 探索的因子分析と検証的因子分析の両方の良さを生かした新たな解析ができるようになる.
解釈しやすく,かつ当てはまりの良いモデルが見つけやすくなる.
有吉先生との取り組み
スパース推定因子分析(正則化なし)
共通因子
A B C DA B C DA駅を利用する
送迎に車を利用
駅まで徒歩移動
駅まで車移動
A駅まで徒歩 駅まで車で送迎
・アンケート項目のグループ分け → 調査項目間の相関関係を解釈することができる
大規模アンケート調査の回答をもとに、対象地域の住民の行動パターンなどを把握
? ?
A駅を利用する
送迎に車を利用
駅まで徒歩移動
駅まで車移動
共通因子は分析者が名付ける必要があるため、解釈しやすい結果が欲しい
解釈しやすくなる
アンケート項目