Skip to content

Instantly share code, notes, and snippets.

@satomacoto
Last active August 3, 2016 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satomacoto/7f0bcda12ab37d762442128d039fbc5e to your computer and use it in GitHub Desktop.
Save satomacoto/7f0bcda12ab37d762442128d039fbc5e to your computer and use it in GitHub Desktop.
ML Validation

機械学習ライブラリを利用するとき、モデルやパラメータの良し悪しを判断するための評価基準。

4.1 Cross validation

4.2 Model Complexity and GridSearchCV

Overfitting/Underfittingとパラメータの調整

4.3 Analyzing Model Capacity

学習曲線を描いてOverfitting/Underfittingの確認

4.4 Model Evaluation and Scoring Metrics

Cond Pos Cond Neg
Pred Pos (陽性) TP FP
Pred Neg (陰性) FN TN
P N
  • 陽性 Positive
  • 陰性 Negative
  • 真陽性率、感度、再現率 true positive ratio (TPR), sensitivity, recall
    • TP/P = TP/(TP+FN)
    • 正例のうちどれほど当てられたか
  • 特異性 true negative ratio, spcificity (SPC)
    • TN/(TN+FP)
    • 負例のうちどれほど当てられたか
  • 偽陽性率 false positive ratio (FPR), fall-out
    • FP/N = 1-TN/N
    • どれほど間違って陽性と判断されたか
  • 精度、適合率 Precision, positive predictive ratio (PPR)
    • TP/(TP+FP)
    • 陽性と判断されたうちどれほど当たっているか

参考

http://cdn-ak.f.st-hatena.com/images/fotolife/c/chezou/20160529/20160529204510.jpg

真のモデル→(バイアス)→得られたサンプル→(バリアンス)→推定結果

Overfitting

  • ハイバリアンス
  • 訓練とテストの差が大きい
  • データを増やす
  • 特徴量を減らす

Underfitting

  • ハイバイアス
  • 目標の精度に達しない
  • 特徴量を増やす
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment