def fit(self, weighted, show_progress=True):
        """ Computes and stores the similarity matrix """
        self.similarity = all_pairs_knn(weighted, self.K,
                                        show_progress=show_progress,
                                        num_threads=self.num_threads).tocsr()
        self.scorer = NearestNeighboursScorer(self.similarity)
def fit ( self , weighted , show_progress = True ) : self . similarity = all_pairs_knn ( weighted , self . K , show_progress = show_progress , num_threads = self . num_threads ) . tocsr ( ) self . scorer = NearestNeighboursScorer ( self . similarity )
Computes and stores the similarity matrix