# What options are there to combine different distance functions?

I am currently working with feature-vectors that are made up of continuous attributes, so I can use the euclidean distance for things like KNN-classification and clustering. Now I want to add a nominal attribute that has a special distance function defined. What options do I have of combining these distance functions, so I still obtain one distance for two vectors?

1. Combine them in a linear manner ($d=d_1+\alpha d_2$) and find best $\alpha$ by some optimization, let's say minimizing CV error for kNN or minimizing silhouette for clustering.
3. For classification only, you may use "klNN" -- get $k$ neighbors based on first metric and $l$ based on the second.