Implementation for unsupervised forests