kNN is simply based on a remote function. When you say that โfeature two is more important than others,โ this usually means that the difference in function 2 is, say, 10 times the difference in other combinations. An easy way to achieve this is to multiply coordinate # 2 by its weight. Thus, you put in the tree not the original coords, but coords multiplied by their respective weights.
In case your functions are combinations of coords, you may need to apply the appropriate matrix transformation on your coords before applying weights, see PCA (analysis of the main components). The PCA will probably help you with question 2.
source share