ipSymLS {Correlplot}R Documentation

Function for obtaining a weighted least squares low-rank approximation of a symmetric matrix

Description

Function ipSymLS implements an alternating least squares algorithm that uses both decomposition and block relaxation to find the optimal positive semidefinite approxation of given rank p to a known symmetric matrix of order n.

Usage

ipSymLS(target, w = matrix(1, dim(target)[1], dim(target)[2]), ndim = 2,
        init = FALSE, itmax = 100, eps = 1e-06, verbose = FALSE)

Arguments

target

Symmetric matrix to be approximated

w

Matrix of weights

ndim

Number of dimensions extracted (2 by default)

init

Initial value for the solution (optional; if supplied should be a matrix of dimensions nrow(target) by ndim)

itmax

Maximum number of iterations

eps

Tolerance criterion for convergence

verbose

Show the iteration history (verbose=TRUE) or not (verbose=FALSE)

Value

A matrix with the coordinates for the variables

Author(s)

deleeuw@stat.ucla.edu

References

De Leeuw, J. (2006) A decomposition method for weighted least squares low-rank approximation of symmetric matrices. Department of Statistics, UCLA. Retrieved from https://escholarship.org/uc/item/1wh197mh

Graffelman, J. and De Leeuw, J. (2023) Improved approximation and visualization of the correlation matrix. The American Statistician pp. 1–20. Available online as latest article doi:10.1080/00031305.2023.2186952

Examples

data(banknotes)
R <- cor(banknotes)
W <- matrix(1,nrow(R),nrow(R))
diag(W) <- 0
Fp.als <- ipSymLS(R,w=W,verbose=TRUE,eps=1e-15)
Rhat.als <- Fp.als%*%t(Fp.als)

[Package Correlplot version 1.1.0 Index]