# testing of data in random forest?

I want to clarify point in random forest literature. In random forest we select random features from a subset of data, i.e it is subset of features from subset of data for a single tree. But when we test the data, let's take a test sample 'v' from the test data. The data has say '5' features.

1. Tree one was constructed using features 3 and 2.
2. Tree two was constructed using features 2,3, and 5.
3. Tree three was constructed using features 1,2 and 3.
4. Tree four was constructed using features 1,4,and 5.

at leaf node we will have probability showing to which class does the 'v' point belongs.

My question is : Will each forest choose same features from the test data sample 'v' as it used when the tree was constructed. ?
for example will tree one will use features 3 and 2. and tree two use feature 2, 3 and 5. respectively

• Why do you think that it does not use them? Jun 4, 2018 at 7:51

## 1 Answer

Yes, it has to use the same featues. If not, the training algorithm does not make any sense.