ComeçarComece de graça

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.

Este exercício faz parte do curso

Practicing Statistics Interview Questions in R

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

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

# Calculate probabilities for the test data
probabilities <- ___(___, newdata = ___, type = ___)
Editar e executar o código