Skip to content

Commit 02a3ae6

Browse files
authored
Update logisticRegression.py
support for python >=3.6
1 parent 5efeaa9 commit 02a3ae6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Logistic_and_maximum_entropy_models/logisticRegression.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def logisticRegression(trainDataList, trainLabelList, iter = 200):
114114
#返回学到的w
115115
return w
116116

117-
def test(testDataList, testLabelList, w):
117+
def model_test(testDataList, testLabelList, w):
118118
'''
119119
验证
120120
:param testDataList:测试集
@@ -156,7 +156,7 @@ def test(testDataList, testLabelList, w):
156156

157157
#验证正确率
158158
print('start to test')
159-
accuracy = test(testData, testLabel, w)
159+
accuracy = model_test(testData, testLabel, w)
160160

161161
# 打印准确率
162162
print('the accuracy is:', accuracy)

0 commit comments

Comments
 (0)