MCPcopy Index your code
hub / github.com/rushter/MLAlgorithms / clip

Method clip

mla/svm/svm.py:118–123  ·  view source on GitHub ↗
(self, alpha, H, L)

Source from the content-addressed store, hash-verified

116 return np.dot((self.alpha[self.sv_idx] * self.y[self.sv_idx]).T, k_v.T) + self.b
117
118 def clip(self, alpha, H, L):
119 if alpha > H:
120 alpha = H
121 if alpha < L:
122 alpha = L
123 return alpha
124
125 def _error(self, i):
126 """Error for single example."""

Callers 6

_trainMethod · 0.95
fit_transformMethod · 0.45
_q_distributionMethod · 0.45
loglossFunction · 0.45
binary_crossentropyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected