update
This commit is contained in:
@@ -1206,7 +1206,7 @@ lmbda = 0.001
|
||||
Id = n*lmbda* np.eye(XT_X.shape[0])
|
||||
|
||||
# Hessian matrix
|
||||
H = (2.0/n)* XT_X+2*lmbda
|
||||
H = (2.0/n)* XT_X+2*lmbda* np.eye(XT_X.shape[0])
|
||||
# Get the eigenvalues
|
||||
EigValues, EigVectors = np.linalg.eig(H)
|
||||
print(f"Eigenvalues of Hessian Matrix:{EigValues}")
|
||||
|
||||
Reference in New Issue
Block a user