Learn R Programming

fastLogisticRegressionWrap (version 1.2.0)

eigen_compute_single_entry_of_diagonal_matrix: Compute Single Value of the Diagonal of a Symmetric Matrix's Inverse

Description

Via the eigen package's conjugate gradient descent algorithm.

Usage

eigen_compute_single_entry_of_diagonal_matrix(M, j, num_cores = 1)

Value

The value of m^-1_j,j

Arguments

M

The symmetric matrix which to invert (and then extract one element of its diagonal)

j

The diagonal entry of M's inverse

num_cores

The number of cores to use. Default is 1.

Author

Adam Kapelner

Examples

Run this code
	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