k-nn classification with variable selection inside leaves of a tree