Finding the Optimal # of Trees

Dear Dr. Ballings,

In section 2.8.6 Exercises for Section 2.5.7, the question asks,

"Create a bagged tree of the following tree and tune the ensemble size."

In the book on page 122, the following code is used:

#Create 3 trees
ensemblesize <- 10

ensembleoftrees <- vector(mode='list',length=ensemblesize)

Why is the ensemble size 10 if we are creating 3 trees?

Thank you for your help, I greatly appreciate it.

Answers and follow-up questions

Answer or follow-up question 1

Dear student,

Thank you for pointing this out.

That is a typo: it should be
#Create 10 trees

Michel Ballings

Sign in to be able to add an answer or mark this question as resolved.