tree model minimisation library