6
$\begingroup$

I found that learning how MCMC and HMM work went best by writing the code of simple examples myself. I would now like to learn how random forests work, but it's again not that trivial to transform the theoretical texts and pseudocode to real scripts (well... for me at least).

Could anybody point me to simple examples of random forests? I know of the R package and so on (and I have used it already) but instead of an interface I really would prefer to have some code of a specific example that I can imitate to learn how random forests are constructed.

$\endgroup$
6
$\begingroup$

For implementations, see this Q. However I wouldn't say any of them is easy to follow.

In fact the main issue is the tree building itself. It is usually cluttered code adapted from some other package, the rest of the algorithm is mostly trivial... you may thus try first to write random naive Bayes or some similar algorithm using simpler base classifier.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.