lsq | R Documentation |
One of the four matrices from the least-squares solution of problems in surveying that were used by Michael Saunders and Chris Paige in the testing of LSQR
data(lsq)
A list of class matrix.csc.hb
or matrix.ssc.hb
depending
on how the coefficient matrix is stored with the following components:
ra component of the csc or ssc format of the coefficient matrix, X.
ja component of the csc or ssc format of the coefficient matrix, X.
ia component of the csc or ssc format of the coefficient matrix, X.
ra component of the right-hand-side, y, if stored in csc or ssc format; right-hand-side stored in dense vector or matrix otherwise.
ja component of the right-hand-side, y, if stored in csc or ssc format; a null vector otherwise.
ia component of the right-hand-side, y, if stored in csc or ssc format; a null vector otherwise.
vector of the exact solutions, b, if they exist; a null vector o therwise.
vector of the initial guess of the solutions if they exist; a null vector otherwise.
dimenson of the coefficient matrix, X.
dimenson of the right-hand-side, y.
storage mode of the right-hand-side; can be full storage or same format as the coefficient matrix.
Koenker, R and Ng, P. (2002). SparseM: A Sparse Matrix Package for R,
http://www.econ.uiuc.edu/~roger/research/home.html
Matrix Market, https://math.nist.gov/MatrixMarket/data/Harwell-Boeing/lsq/lsq.html
read.matrix.hb
data(lsq)
class(lsq) # -> [1] "matrix.csc.hb"
model.matrix(lsq)->X
class(X) # -> "matrix.csr"
dim(X) # -> [1] 1850 712
y <- model.response(lsq) # extract the rhs
length(y) # [1] 1850
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.