From 2cd55912cdf96c9536d0fbcf6befc328d50b9885 Mon Sep 17 00:00:00 2001 From: Shounak Date: Sun, 5 Jan 2020 19:41:36 +0530 Subject: [PATCH] Update costfunctions.py --- costfunctions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/costfunctions.py b/costfunctions.py index 38a92a9..589f13d 100644 --- a/costfunctions.py +++ b/costfunctions.py @@ -43,4 +43,7 @@ def sigmoid(z): return 1.0/(1.0+np.exp(-z)) def sigmoid_prime(z): - return sigmoid(z)*(1-sigmoid(z)) \ No newline at end of file + return sigmoid(z)*(1-sigmoid(z)) + +def quadratic_cost(a, y): + return 0.5*np.linalg.norm(a-y)**2