fix: bug
This commit is contained in:
@@ -63,7 +63,7 @@ def evaluate_logreg(
|
||||
- float: 分类准确率。
|
||||
"""
|
||||
correct = 0
|
||||
total = 68 # LogReg 测试样本数
|
||||
total = 68 # LogReg 测试样本数
|
||||
temp_log_details = []
|
||||
|
||||
try:
|
||||
@@ -77,7 +77,7 @@ def evaluate_logreg(
|
||||
for i in range(len(test_data)):
|
||||
# 获取测试数据中的每个样本
|
||||
result = user_test_func(test_data[i], wegihts)
|
||||
if result == test_labels[i]:
|
||||
if result == test_labels[i] and test_labels[i] != -1:
|
||||
correct += 1
|
||||
else:
|
||||
temp_log_details.append(
|
||||
|
||||
Reference in New Issue
Block a user