[go: nahoru, domu]

Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kun Luo committed Jul 21, 2021
1 parent a0b2e52 commit 5f60842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LogisticRegression/logistic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def __init__(self, input_dim: int, lr: float):
input_dim (int):输入维度
lr (float): 学习率
"""
self.weights = np.random.randn(input_dim + 1) # 随机初始化参数
self.lr = lr # 学习率
self.weights = np.random.randn(input_dim + 1) # 随机初始化参数

def fit(self, X: np.ndarray, Y: np.ndarray):
X_pad = pad(X) # 为X填充1作为偏置
Expand Down

0 comments on commit 5f60842

Please sign in to comment.