Returns the distance (COSINE, EUCLIDEAN, ...) between two document vectors (0.0-1.0).
(self, document1, document2, *args, **kwargs)
| 1078 | search = vector_space_search |
| 1079 | |
| 1080 | def distance(self, document1, document2, *args, **kwargs): |
| 1081 | """ Returns the distance (COSINE, EUCLIDEAN, ...) between two document vectors (0.0-1.0). |
| 1082 | """ |
| 1083 | return distance(document1.vector, document2.vector, *args, **kwargs) |
| 1084 | |
| 1085 | # def cluster(self, documents=ALL, method=KMEANS, k=10, iterations=10) |
| 1086 | # def cluster(self, documents=ALL, method=HIERARCHICAL, k=1, iterations=1000) |