Reputation: 1754
I am trying to implement an approach following a paper which compares the content vectors of words to a prototype vector, which is representative of the entire class/cluster/type/etc. In the first step, a prototype vector is calculated and I do not quite understand how the way to acquire prototype vectors.
I referred to here to the discussion of this question: However, this post seems to answer what the prototype vector is theoretically, while I need to find a practical solution to implement.
Is there an implementation in Python // Sci-kit learn that can realize the function of
A. defining/indicate a priori or induce from training instances a prototype vector B. then input feature vectors to be compared for similarity against the prototype vector from A.?
Thank you in advance for you help.
Upvotes: 0
Views: 428
Reputation: 28768
I think you are looking for the Nearest Centroid Classifier: http://scikit-learn.org/dev/modules/neighbors.html#nearest-centroid-classifier
Upvotes: 1