Logistic regression是一種用來做classification的方式
Logistic regression讓我們可以解決預測離散類別 (discrete categories)的分類問題
傳統的二元分類問題有0或1兩個種類
我們不可以用Linear regression來做二元分類
擬合後會出現小於0或大於1的值
Logistic function (Sigmoid function)的值域介於0跟1之間, 因此一般會使用Logistic regression
在使用training data訓練完Logistic regression的模型後, 將會使用testing data來評估模型的performance
Confusion matrix
真正的精度 (accuracy)的算法:
(TP + TN)/total = 150/165 = 0.91
Misclassification rate:
(FP + FN)/total = 15/165 = 0.09
False Positive: Type 1 error
False Negative: Type 2 error
Last updated 5 years ago