We mentioned a metric-based approach when we discussed the one-shot scenario in the Introduction to meta learning section, but this approach applies to k-shot learning in general. The idea is to measure the similarity between the unlabeled query sample and all other samples of the support set. Using these similarity scores, we can compute a probability distribution . The following formula reflects this mechanism:
Here, α is the similarity measure between the query samples and is the size of the support set with n classes and k samples of each class. To clarify, the label of the query sample is simply a linear combination of all samples of the support set. The classes of the samples with higher similarities will have higher contributions to the distribution of the label of the query sample. We can implement α as a clustering algorithm...