SVM的概率輸出(Platt scaling)
最近在研究基於樣本的相似度度量問題,其中用到了分類器的概率輸出(Platt scaling),大概了解了一下用法,總結的比較簡單。
Platt scaling參考wiki的定義,Platt scaling,也叫Platt calibration,是一種將分類模型的輸出變換為基於類別的概率分布的方法(可能翻譯的不太准確,附上原文:In machine learning, Platt scaling or Platt calibration is a way of transforming the outputs of a classification model into a probability distribution over classes.)Platt scaling最初是用來解決SVM分類結果的概率輸出(也可用於其他分類方法),采用邏輯斯蒂回歸模型擬合分類器分數(classifier's socre)。
這里定義SVM的輸出(非閾值化的):
其中
Platt基於Bayes准則,用后驗概率 P(y=1|f) 替代類別條件密度 p(f|y),采用Sigmoid的參數化形式表達。
模型有兩個參數A和B,采用最大似然估計訓練,定義新的訓練集合,其中ti為目標概率:
最小化訓練數據的Negative Log Likelihood,目標函數為cross-entropy error function:
其中
Platt在論文中指出優化的兩個問題:訓練集的選擇和避免過擬合的方法。
Platt Scaling的方法相當於創建新的訓練集(SVM分類器輸出Score和標簽),基於這些新的數據進行訓練,訓練模型的輸出就是分類器的概率輸出。
相關參考:
Classifier calibration with Platt's scaling and isotonic regression
Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods 1999