diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-29 17:49:39 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-29 17:52:47 +0200 |
| commit | 5a2fb0139e5797a48afa1ca646a26c09c7a56936 (patch) | |
| tree | 516a288bb53064bf212d7a4e03663b479ed43442 /src/logreg_train.py | |
| parent | a1c7fe1b6d95e2560e62c12453da287d36d4a714 (diff) | |
| download | dslr-master.tar.gz dslr-master.tar.bz2 dslr-master.zip | |
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]))) |
