MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / _check

Method _check

machine_learning/sequential_minimum_optimization.py:422–424  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

420 return np.exp(-1 * (self.gamma * np.linalg.norm(v1 - v2) ** 2))
421
422 def _check(self):
423 if self._kernel == self._rbf and self.gamma < 0:
424 raise ValueError("gamma value must be non-negative")
425
426 def _get_kernel(self, kernel_name):
427 maps = {"linear": self._linear, "poly": self._polynomial, "rbf": self._rbf}

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected