CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Practicing Statistics Interview Questions in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

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

# Calculate probabilities for the test data
probabilities <- ___(___, newdata = ___, type = ___)
Modifier et exécuter le code