in my case I have a data set with 15 examples, and each has 100 attributes. I want to use these 15 examples to classifiy unseen examples based on the similarity/distance between them. The classification is based on the nearest neighbors class.
Specifically in my setting is that the meaningful attributes without noise or better say which features contain relevant information are different for each example. For instance, for the examples 1 to 5, the meaningful attributes are distributed in 90 features (from 0 to 90). For the examples 6 to 10, only the features 0 to 5 are relevant (the other 95 are meaningless/contain noise for comparing the similarity to these instances). Similiar, the examples 11 to 15 are represented best only by features 6 to 10 because the others contain noise to detect these classes. And I assume that only comparing meaningful features should result in better classification performance. In sum, I want to use different features depending on the examples.
How should I do this? Is there any research / paper about such an approach?
I tried out to use Minkowski Distance (p=1,p=2) with different weights (for features). I as weight I used the average for each weight (1/sum(weights)) but unfourtenately my classification results in mostly predicting the classes with less features. Performance is worse than considering all features. So, less features result in smaller distances compared to instances where a large amount of attributes is considered. I think the problem is how to define the weights accordingly to the setting. How can I do this easily? I there something in python available? How can I find/learn appropriate weights?
Thanks for any hints!