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

Method _linear

machine_learning/sequential_minimum_optimization.py:416–417  ·  view source on GitHub ↗
(self, v1, v2)

Source from the content-addressed store, hash-verified

414 return (self.gamma * np.inner(v1, v2) + self.coef0) ** self.degree
415
416 def _linear(self, v1, v2):
417 return np.inner(v1, v2) + self.coef0
418
419 def _rbf(self, v1, v2):
420 return np.exp(-1 * (self.gamma * np.linalg.norm(v1 - v2) ** 2))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected