更新 function.py
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 31s

This commit is contained in:
2024-11-02 13:16:46 +08:00
parent 13b0862cc1
commit 27df132795
+6
View File
@@ -48,9 +48,15 @@ def handle_outliers(df, threshold=3):
def load_data(filepath):
data = []
labels = []
line_number = 0 # 初始化行号计数器
with open(filepath, 'r') as f:
for line in f:
line_number += 1 # 每读取一行,行号加1
# 检查当前行号,跳过特定行
if line_number == 3 or line_number in range(24, 29):
continue
values = line.strip().replace('?', '0').split()
try:
values = [float(v) for v in values]