eigen_compute_single_entry_of_diagonal_matrix {fastLogisticRegressionWrap} | R Documentation |
Via the eigen package's conjugate gradient descent algorithm.
eigen_compute_single_entry_of_diagonal_matrix(M, j, num_cores = 1)
M |
The symmetric matrix which to invert (and then extract one element of its diagonal) |
j |
The diagonal entry of |
num_cores |
The number of cores to use. Default is 1. |
The value of m^-1_j,j
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