Implementation of ensemble trees