powered by
Via the eigen package's conjugate gradient descent algorithm.
eigen_compute_single_entry_of_diagonal_matrix(M, j, num_cores = 1)
The value of m^-1_j,j
The symmetric matrix which to invert (and then extract one element of its diagonal)
The diagonal entry of M's inverse
M
The number of cores to use. Default is 1.
Adam Kapelner
n = 500 X = matrix(rnorm(n^2), nrow = n, ncol = n) M = t(X) %*% X j = 137 eigen_compute_single_entry_of_diagonal_matrix(M, j) solve(M)[j, j] #to ensure it's the same value
Run the code above in your browser using DataLab