(self, arr)
| 79 | self.description_vectors = self.vectorizer.fit_transform(self.descriptions) |
| 80 | |
| 81 | def _normalize(self, arr): |
| 82 | min_val = arr.min() |
| 83 | max_val = arr.max() |
| 84 | if max_val - min_val == 0: |
| 85 | return np.zeros_like(arr, dtype=float) |
| 86 | return (arr - min_val) / (max_val - min_val) |
| 87 | |
| 88 | def retrieve_ds(self, query, N=10, sim_w=1.0, like_w=0.0, dwn_w=0.0): |
| 89 | """ |
no outgoing calls
no test coverage detected