MCPcopy Create free account
hub / github.com/MachineLP/TextMatch / _normalize

Method _normalize

textmatch/models/model_base/model_base.py:22–24  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

20 pass
21
22 def _normalize(self, x):
23 x /= (np.array(x)**2 + 0.00000001).sum(axis=1, keepdims=True)**0.5
24 return x
25
26 def predict(self, words):
27 pass

Callers 14

initMethod · 0.45
predictMethod · 0.45
initMethod · 0.45
_predictMethod · 0.45
predictMethod · 0.45
initMethod · 0.45
predictMethod · 0.45
initMethod · 0.45
predictMethod · 0.45
initMethod · 0.45
_predictMethod · 0.45
predictMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected