Get startedGet started for free

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.

This exercise is part of the course

Practicing Statistics Interview Questions in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Build a logistic model on the train data
model <- ___(___ ~ NHR + ___, data = ___, family = ___)

# Calculate probabilities for the test data
probabilities <- ___(___, newdata = ___, type = ___)
Edit and Run Code