random forest without explict tree data structure • /r/MachineLearning
Today I got the idea that if we only care about prediction result in random forest, we can construct the decision tree without explict tree data structure. What I did is just to send a recursive function two vectors of sample ids: one for training and one for testing. The function will do binary split and send two splited vector to itself recursively. At the terminal node, the function just assign mean value to each testing sample. I successfully implemented such simplified decision tree with only 46 line of c code!
Jun-5-2016, 13:05:48 GMT
- Technology: