Mercurial > hg > tvii
annotate tvii/gradient_descent.py @ 87:9d5a5e9f5c3b
add kmeans + dataset
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 14:05:57 -0800 |
parents | 857a606783e1 |
children |
rev | line source |
---|---|
44
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
1 """ |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
2 gradient descent for neural networks |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
3 """ |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
4 |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
5 # Each loop: |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
6 # - computes predictions |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
7 # - compute derivatives: dw, db |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
8 # update: w = w - alpha * dw; b = b - .... |
857a606783e1
[documentation] notes + stubs on gradient descent
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
9 |