ComeçarComece de graça

Speed-accuracy trade-off

In the last video, you have seen there are two knobs you can tune to influence the performance of the random forests:

  • Number of decision trees in each forest.
  • Number of variables used for splitting within decision trees.

Increasing each of them might improve the accuracy of the imputation model, but it will also require more time to run. In this exercise, you will explore these ideas yourself by fitting missForest() to the biopics data twice with different settings. As you follow the instructions, pay attention to the errors you will be printing, and to the time the code takes to run.

Este exercício faz parte do curso

Handling Missing Data with Imputations in R

Ver curso

Exercício interativo prático

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

# Set number of trees to 5 and number of variables used for splitting to 2
imp_res <- missForest(biopics, ___ = ___, ___ = ___)

# Print the resulting imputation errors
print(___)
Editar e executar o código