Understanding and implementing random forests