MCPcopy
hub / github.com/apachecn/ailearning / clipAlpha

Function clipAlpha

src/python/6.SVM/svm-complete.py:199–212  ·  view source on GitHub ↗

clipAlpha(调整aj的值,使aj处于 L<=aj<=H) Args: aj 目标值 H 最大值 L 最小值 Returns: aj 目标值

(aj, H, L)

Source from the content-addressed store, hash-verified

197
198
199def clipAlpha(aj, H, L):
200 """clipAlpha(调整aj的值,使aj处于 L<=aj<=H)
201 Args:
202 aj 目标值
203 H 最大值
204 L 最小值
205 Returns:
206 aj 目标值
207 """
208 if aj > H:
209 aj = H
210 if L > aj:
211 aj = L
212 return aj
213
214
215def innerL(i, oS):

Callers 1

innerLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected