Mercurial > hg > tvii
changeset 33:e2dd9503098f
finalize logistic regression notes
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 04 Sep 2017 13:29:11 -0700 |
parents | 0f29b02f4806 |
children | 018c70393353 |
files | links.txt tvii/logistic_regression.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/links.txt Mon Sep 04 13:20:25 2017 -0700 +++ b/links.txt Mon Sep 04 13:29:11 2017 -0700 @@ -1,1 +1,2 @@ https://s3.amazonaws.com/MLMastery/ml_performance_improvement_cheatsheet.pdf?__s=2gnd4eijcmfwyncxqmmz +http://www.wildml.com/2015/09/implementing-a-neural-network-from-scratch/
--- a/tvii/logistic_regression.py Mon Sep 04 13:20:25 2017 -0700 +++ b/tvii/logistic_regression.py Mon Sep 04 13:29:11 2017 -0700 @@ -185,8 +185,8 @@ """ # initialize parameters with zeros - raise NotImplementedError('TODO') # -> record TODO items - w, b = initialize_with_zeros(X_train.shape[0]) + w = np.zeros((X_train.shape[0], 1)) + b = 0 # Gradient descent parameters, grads, costs = optimize(w, b, X_train, Y_train, num_iterations, learning_rate, print_cost=print_cost)