Optimal classification into groups: an approach for solving the taxonomy problem.