Classification evaluation
In the previous lesson, you have built a logistic model to predict Parkinson's disease. In this exercise, you will compare predictions against actual values.
This skill is vital because companies focus on the results. Employers want to know how accurate the models that you develop are.
Once again, you will build a model to predict the status of Parkinson's disease. This time, you will build the model on part of the dataset and use the rest for testing.
Remember that \(\text{recall} = \frac{TP}{TP+FN}\).
\(TP\) means that we have predicted a positive value and we were right.
\(FN\) means that we have predicted a negative value but we were wrong.
Around 80% of the rows of the parkinsons dataset have been assigned to train, and the rest have been assigned to test.
本练习是课程的一部分
Practicing Statistics Interview Questions in R
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Build a logistic model on the train data
model <- ___(___ ~ NHR + ___, data = ___, family = ___)
# Calculate probabilities for the test data
probabilities <- ___(___, newdata = ___, type = ___)