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

Method __linear

machine_learning/support_vector_machines.py:81–83  ·  view source on GitHub ↗

Linear kernel (as if no kernel used at all)

(self, vector1: ndarray, vector2: ndarray)

Source from the content-addressed store, hash-verified

79
80 # kernels
81 def __linear(self, vector1: ndarray, vector2: ndarray) -> float:
82 """Linear kernel (as if no kernel used at all)"""
83 return np.dot(vector1, vector2)
84
85 def __rbf(self, vector1: ndarray, vector2: ndarray) -> float:
86 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected