diff options
Diffstat (limited to 'src/logreg_train.py')
| -rwxr-xr-x | src/logreg_train.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logreg_train.py b/src/logreg_train.py index e02e101..6254494 100755 --- a/src/logreg_train.py +++ b/src/logreg_train.py @@ -35,7 +35,7 @@ def train(ys, xs): ys_ally = ys.copy() ys_ally[ys == trained] = 0 # opposite? ys_ally[ys != trained] = 1 - thetas.append((trained, gradient_descent(ys_ally, xs, 1, 2))) + thetas.append((trained, gradient_descent(ys_ally, xs, 1, 100))) return thetas if __name__ == '__main__': @@ -51,5 +51,5 @@ if __name__ == '__main__': thetas = train(Y, X) with open("weights", "w") as f: - for name, t in thetas: - f.write("{}: {}\n".format(name, ','.join([str(x) for x in t]))) + for label, t in thetas: + f.write("{}: {}\n".format(label, ','.join([str(x) for x in t]))) |
