11
Gitea Actions Experiment Test / Experiment-Actions (push) Successful in 11s

This commit is contained in:
lzh
2024-11-02 13:39:47 +08:00
parent 8259bce15c
commit b78122073e
+2 -1
View File
@@ -27,7 +27,7 @@ name = "廖子豪"
# 这里写自己的代码实现 # 这里写自己的代码实现
def load_data(filepath(horse-colic.test)): def load_data(filepath):
""" """
从文件中加载数据。 从文件中加载数据。
@@ -49,6 +49,7 @@ def load_data(filepath(horse-colic.test)):
X = np.nan_to_num(X, nan=np.nanmean(X, axis=0)) X = np.nan_to_num(X, nan=np.nanmean(X, axis=0))
return X, y return X, y
def train_logreg(X, y, learning_rate=0.01, iterations=1000): def train_logreg(X, y, learning_rate=0.01, iterations=1000):
""" """
对率回归训练函数。 对率回归训练函数。