MCPcopy Create free account
hub / github.com/SamuelSchmidgall/AgentLaboratory / _normalize

Method _normalize

tools.py:81–86  ·  view source on GitHub ↗
(self, arr)

Source from the content-addressed store, hash-verified

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 """

Callers 2

__init__Method · 0.95
retrieve_dsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected