导入
Logistic 回归简介
了解分类问题和逻辑回归。
...
Linear regression
...
Logistic regression
\small p(X) = \frac{1}{1 + e^{-(w_{0} + w_{1}X)}}
...
Cutoff point at 0.5
...
Confusion matrix
\small \begin{align*} \text{Accuracy} &= \frac{\text{Correct Predictions}}{\text{Total}}\ \text{Accuracy} &= \frac{(TN + TP)}{\text{Total}} = \frac{90}{100} = 0.90 \end{align*}
\small \begin{align*} \text{Error Rate} &= \frac{\text{Wrong Predictions}}{\text{Total}}\ \text{Error Rate} &= \frac{(FP + FN)}{\text{Total}} = \frac{10}{100} = 0.10 \end{align*}
\small \begin{align*}\text{Specificity} &= \frac{TN}{\text{Actual No}} \ &= \frac{40}{43} = 0.93\end{align*}
\small \begin{align*} \text{Precision} &= \frac{TP}{\text{Predicted Yes}} \ &= \frac{50}{53} = 0.94 \end{align*}