From ad638844ee05545c912041fca3bbe695ba1a07bf Mon Sep 17 00:00:00 2001 From: asilador <asilador@illinois.edu> Date: Wed, 15 Feb 2017 13:51:23 -0600 Subject: [PATCH] Update --- Assignment 1/assignment1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assignment 1/assignment1.py b/Assignment 1/assignment1.py index df70301..1e122ee 100644 --- a/Assignment 1/assignment1.py +++ b/Assignment 1/assignment1.py @@ -12,7 +12,7 @@ m = 1 #x = np.asmatrix(np.zeros(np.size(b))) #x = np.transpose(x) #make column vector #x=np.matrix(np.random.rand(5,1)) -x = np.transpose(np.asmatrix(np.ones(np.size(b)))*0.1) +x = np.transpose(np.asmatrix(np.ones(np.size(b)))*1) alpha0 = 1.0 count = 0 @@ -32,7 +32,7 @@ def armijo(alpha0,Q,b,c,D,m): #print('alpha is ', alpha) s = 1.0 sigma = 1.0 - beta = 1.0/2 + beta = 1.0/10 while f(Q,b,c,x+np.transpose(beta**m*s*D)) < f(Q,b,c,x) + sigma*beta**m*s*(np.transpose(gradf(Q,b,x)))*np.transpose(D): m+=1 #print('m is ', m) -- GitLab