changeset 25:c52d8173b056

[regression] cleanup + proper structure
author Jeff Hammel <k0scist@gmail.com>
date Mon, 04 Sep 2017 10:16:01 -0700
parents 89f46435a9e2
children d945a862617c
files tvii/logistic_regression.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tvii/logistic_regression.py	Mon Sep 04 09:58:01 2017 -0700
+++ b/tvii/logistic_regression.py	Mon Sep 04 10:16:01 2017 -0700
@@ -44,8 +44,10 @@
     """
 
     m = X.shape[1]
+
+    cost = cost_function(w, b, X, Y)  # compute cost
+
     A = sigmoid(w.T*X + b)  # compute activation
-    cost = cost_function(w, b, X, Y)
     raise NotImplementedError('TODO')