MCPcopy Index your code
hub / github.com/Dod-o/Statistical-Learning-Method_Code / calcEi

Method calcEi

SVM/SVM.py:176–186  ·  view source on GitHub ↗

计算Ei 根据“7.4.1 两个变量二次规划的求解方法”式7.105 :param i: E的下标 :return:

(self, i)

Source from the content-addressed store, hash-verified

174 return gxi
175
176 def calcEi(self, i):
177 '''
178 计算Ei
179 根据“7.4.1 两个变量二次规划的求解方法”式7.105
180 :param i: E的下标
181 :return:
182 '''
183 #计算g(xi)
184 gxi = self.calc_gxi(i)
185 #Ei = g(xi) - yi,直接将结果作为Ei返回
186 return gxi - self.trainLabelMat[i]
187
188 def getAlphaJ(self, E1, i):
189 '''

Callers 2

getAlphaJMethod · 0.95
trainMethod · 0.95

Calls 1

calc_gxiMethod · 0.95

Tested by

no test coverage detected