main #1

Closed
Wyy wants to merge 4 commits from Wyy/Experiment-LogReg:main into main
Showing only changes of commit e4bf84d286 - Show all commits
+2 -1
View File
@@ -5,7 +5,7 @@ import numpy as np
"""
id = "202210423224"
name = "吴杨洋"
def sigmoid(z):
"""
Sigmoid 激活函数。
@@ -34,6 +34,7 @@ def train_logreg(X, y, learning_rate=0.01, iterations=1000):
weights -= learning_rate * gradient
return weights
def predict_logreg(inX, weights):
"""
对率回归预测函数。