MCPcopy Create free account
hub / github.com/apachecn/ailearning / updateEk

Function updateEk

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

updateEk(计算误差值并存入缓存中。) 在对alpha值进行优化之后会用到这个值。 Args: oS optStruct对象 k 某一列的行号

(oS, k)

Source from the content-addressed store, hash-verified

183
184
185def updateEk(oS, k):
186 """updateEk(计算误差值并存入缓存中。)
187
188 在对alpha值进行优化之后会用到这个值。
189 Args:
190 oS optStruct对象
191 k 某一列的行号
192 """
193
194 # 求 误差:预测值-真实值的差
195 Ek = calcEk(oS, k)
196 oS.eCache[k] = [1, Ek]
197
198
199def clipAlpha(aj, H, L):

Callers 1

innerLFunction · 0.70

Calls 1

calcEkFunction · 0.70

Tested by

no test coverage detected