generated from LufsX/Experiment-LogReg
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ def sigmoid(z):
|
||||
"""计算sigmoid函数"""
|
||||
return 1 / (1 + np.exp(-z))
|
||||
|
||||
def train_logreg(X, y, learning_rate=0.01, iterations=1000,l2_penalty=0.01):
|
||||
def train_logreg(X, y, learning_rate=0.01, iterations=1000l,2_penalty=0.01):
|
||||
"""对率回归训练函数。"""
|
||||
weights = np.zeros(X.shape[1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user