MLaPP アドベントカレンダー8日目:Ch.8 Logistic regression
ロジスティック回帰の章まできました.このあたりは自分は結構よく知っていることもあり(読む時間もないし…),まとめ方は雑になってます.多くの本では,ロジスティック回帰の説明がなされている章で大抵ロジスティック回帰そのものよりも非線形最適化の話に注力されていることが多いのですが,この本も例外ではなく,ロジスティック回帰のパラメータ推定のための方法論に多くの内容が割かれています.この手のモデルのパラメータ推定をしようとしていてHessianがお亡くなりになった経験がある方は多いと思うのですが,その手の詳しい人は特に読む必要はない印象です.むしろ次の章の一般化線形モデルの章の方が多くのモデルの関係性が記述されているので,そちらの方が見通しがよくなると思います.
Introduction
-
- この章は識別モデルのアプローチ
- 生成モデルと比較して直接的にをモデル化
Model specification
Model fitting
- MLE
- Steepest descent
- Newton's method
- second order optimization methodの筆頭
- Quasi-Newton methods
- Hの計算コスト超高い
- 各ステップの勾配ベクトルから情報を集めてHessianを近似
- 最も一般的なのはBFGS法
- BFGSはHessianの"diagonal plus low-rank"近似
- メモリを食うのでlimited memory BFGS (L-BFGS)もあるよ
- Multi-class logistic regression
- maximum entropy classifierやconditional logit modelとも(いわゆるロジット)
- Bayesian logistic regression
Online learning and stochastic optimization
- Online learning and regret minimization
- Stochastic optimization and risk minimization
- The LMS algorithm
- The perceptron algorithm
- A Bayesian view
Generative vs discriminative classifier
-
- GDAの事後分布はロジスティック回帰と同じ形をしている
- しかし,GDAによる仮定はロジスティック回帰よりも強い
- これらのモデル間の違いは訓練の仕方にある
- 識別モデルではたいていconditional log likelihood を最大化
- 生成モデルではjoint log likelihood を最大化
- これらは一般的に異なる結果になる
- GDAによる正規分布の仮定が正しいなら,ロジスティック回帰よりも少ないデータで良い性能を出すが,逆も然り (Ng and Jordan 2002)
- Pros and cons of each approach
-
- Easy to fit
- 生成分類器の方が簡単.ロジスティック回帰は凸最適化問題を解く必要あり
- Fit classes separately?
- 生成分類器では各クラスの条件付き確率密度を独立に推定.そのためクラスを増やしても再計算が必要ない.識別モデルではすべてのパラメータが相互依存しているので,クラスを増やしたら再計算
- Handle missing features easily?
- 生成分類器ではSec 8.6.2の方法でシンプルに扱える.識別モデルでは良い方法がない
- Can handle unlabeled training data?
- これはsemi-supervised learning(半教師あり学習)で関心のあるトピック.生成モデルでは取り扱いやすいが識別モデルでは難しい
- Symmetric in inputs and outputs?
- 生成モデルを逆向きに走らせるとp(x|y)を計算できる.識別モデルは入力データを生成できない.
- Can handle feature preprocessing?
- 識別モデルの大きな利点は任意の形で入力を前処理できる.たとえばxの代わりにを用いるなど.生成モデルではこういうことは難しい
- Well-calibrated probabilities?
- naive Bayesのような生成モデルは強い独立性を仮定しているため,しばしばキャリブレートが難しい.識別モデルはうまくやりやすい
- 重要なのはあなたの”道具箱”に両方入れておくこと
- Easy to fit
-
Model | Classif/regr | Gen/Discr | Param/Non | Section |
---|---|---|---|---|
Discriminant analysis | Classif | Gen | Param | Sec 4.2.2, 4.2.4 |
Naive Bayes classifer | Classif | Gen | Param | Sec 3.5, 3.5.1.2 |
Tree-augmented Naive Bayes classifer | Classif | Gen | Param | Sec 10.2.1 |
Linear regression | Regr | Discrim | Param | Sec 1.4.5, 7.3, 7.6 |
Logistic regression | Classif | Discrim | Param | Sec 1.4.6, 8.3.4, 8.4.3, 21.8.1.1 |
Sparse linear/logistic regression | Both | Discrim | Param | Ch 13 |
Mixture of experts | Both | Discrim | Param | Sec 11.2.4 |
Multiayer perceptron (MLP)/ Neural network | Both | Discrim | Param | Ch 16 |
Conditional random field (CRF) | Classif | Discrim | Param | Sec 19.6 |
K nearest neighbor classifier | Classif | Gen | Non | Sec 14.2, 14.7.3 |
(Infinite) Mixture Discriminant analysis | Classif | Gen | Non | Sec 14.7.3 |
Classification and regression trees (CART) | Both | Discrim | Non | Sec 16.2 |
Boosted model | Both | Discrim | Non | Sec 16.4 |
Sparse kernelized lin/log reg (SKLR) | Both | Discrim | Non | Sec 14.3.2 |
Relevance vector machine (RVM) | Both | Discrim | Non | Sec 14.3.2 |
Support vector machine (SVM) | Both | Discrim | Non | Sec 14.5 |
Gaussian processes (GP) | Both | Discrim | Non | Ch 15 |
Smoothing splines | Regr | Discrim | Non | Sec 15.4.6 |
- Dealing with missing data
- Fisher's linear discriminant analysis (FLDA)