Cost-complexity pruning of random forests