MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / _norm

Method _norm

machine_learning/sequential_minimum_optimization.py:376–383  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

374
375 # Normalize data using min-max method
376 def _norm(self, data):
377 if self._init:
378 self._min = np.min(data, axis=0)
379 self._max = np.max(data, axis=0)
380 self._init = False
381 return (data - self._min) / (self._max - self._min)
382 else:
383 return (data - self._min) / (self._max - self._min)
384
385 def _is_unbound(self, index):
386 return bool(0.0 < self.alphas[index] < self._c)

Callers 2

__init__Method · 0.95
predictMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected