Recursive partitioning: an approach based on the weighted kemeny distance