MCPcopy Create free account
hub / github.com/Jack-Cherish/Machine-Learning / selectJrand

Function selectJrand

SVM/svm-digits.py:91–104  ·  view source on GitHub ↗

函数说明:随机选择alpha_j的索引值 Parameters: i - alpha_i的索引值 m - alpha参数个数 Returns: j - alpha_j的索引值

(i, m)

Source from the content-addressed store, hash-verified

89 return Ek
90
91def selectJrand(i, m):
92 """
93 函数说明:随机选择alpha_j的索引值
94
95 Parameters:
96 i - alpha_i的索引值
97 m - alpha参数个数
98 Returns:
99 j - alpha_j的索引值
100 """
101 j = i #选择一个不等于i的j
102 while (j == i):
103 j = int(random.uniform(0, m))
104 return j
105
106def selectJ(i, oS, Ei):
107 """

Callers 1

selectJFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected