def predict(self, doc):

        doc_vec = self.__createNormalizedVectorRepresentation(doc, None)

        distances = []
        for i in range(self.k):
            distances.append(np.linalg.norm(doc_vec - self.centroids[i]))


        # pp (distances)

        return self.class_labels[distances.index(min(distances))]
.. versionadded:: 2015.5.0
dataset/ETHPy150Open erfannoury/TextClassification/Rocchio.py/Rocchio.predict--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/zpool.py/offline