Thread: Homework#6 Q3
View Single Post
Old 05-13-2013, 07:48 PM
jlaurentum jlaurentum is offline
Join Date: Apr 2013
Location: Venezuela
Posts: 41
Default Re: Homework#6 Q3


I don't know about Python, but in R I was using the "chol2inv" function of the "Matrix" library to find the matrix inverse. It turns out this wasn't the right tool for the job. I ended up using "solve" from the base package to find the inverse. So in R, I used the following functions:
  1. t(M) for the transpose of an M matrix
  2. %*% for matrix-matrix or matrix-vector multiplication (or inner product)
  3. diag(...) to generate a diagonal matrix such as needed for the \lambda I part.
  4. solve(M) to find the inverse of an M matrix.
Reply With Quote