Try   HackMD
tags: SBD

判斷結果好不好的方法

分類指標(目標為離散的)

參考網站

Accuracy

  • 所有分類正確的樣本佔全部樣本的比例
  • ACC = (tp + tn) / 全部樣本

Precision & Recall

參考網站
評估模型指標

[例子]

  • 用"狼來了"的故事,分成四類
  • 前情 : positive 檢測到狼.negative 沒檢測到狼.
  • 這裡的狼代表真實結果,呼喊代表預測結果

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

    1. True Positives : 狼來,小孩叫
    1. False Positives : 狼沒來,小孩叫
    1. False Negatives : 狼來,小孩沒叫
    1. True Negatives : 狼沒來,小孩也沒叫

Precision : 當小孩說了狼來了,真的狼來了機率

  • True Positive Rate
  • 這個值越大越好
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Recall : 進入村莊的狼,我們發現的機率

  • 這個值越大越好

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  • 兩個機率相互影響,如果Recall 要提升,連風吹草動都要說狼來了

  • 如果不想要說了之後發現狼沒來,那就要變嚴格

  • 有一個指標是ROC 指標

  • 結合上面兩者得出的

f1 score

  • 越大越好

f2 score

ROC

參考網址

  • 不同 thershold 的recall & precision 結果曲線
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

AUC(曲線下面積) = 表示“ROC 曲線下面積”

  • 用AUC 的計算 : AUC值越大,結果越正確,如果AUC = 0.5 ,那就和隨機丟銅板一樣
  • 我們希望AUC = 1(但是是不可能的)

F - Score

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  • f 後面的數字是 β 的值
  • β = 1 => f1

迴歸指標(目標為連續的數值)

RMSE

MSE

MAE