# HG changeset patch # User Jeff Hammel # Date 1504551898 25200 # Node ID ae0c345ea09d3b0e4b741bae91b4efc6c390a4d9 # Parent cf7584f0a29fccd3d63665e109a064ee630fd7c9 remove ephemeral notes diff -r cf7584f0a29f -r ae0c345ea09d tvii/logistic_regression.py --- a/tvii/logistic_regression.py Mon Sep 04 12:01:57 2017 -0700 +++ b/tvii/logistic_regression.py Mon Sep 04 12:04:58 2017 -0700 @@ -81,30 +81,3 @@ A = sigmoid(np.dot(w.T, X) + b) cost = np.sum(Y*np.log(A) + (1 - Y)*np.log(1 - A)) return (-1./m)*cost - - -def logistic_regression(_): - """the slow way""" - J = 0 - dw1 =0 - dw2=0 - db=0 - raise NotImplementedError('TODO') - - -def logistic_regression(nx): - dw = np.zeros(nx) - # TODO - # z = np.dot(wT, x) + b # "boradcasting - raise NotImplementedError('TODO') - -# derivatives: -# dz1 = a1 - y1 ; dz2 = a2 - y2 ; .... -# dZ = [ dz1 dz2 ... dzm ] -# Z = w'X + b = np.dot(w', X) + b -# A sigmoid(Z) -#dZ = A - Y -#dw = (1./m)*X*dZ' -#db = (1./m)*np.sum(dZ) -# w -= alpha*dw -# b -= alpha*db