public class QRDecomposition extends Object
Constructor and Description |
---|
QRDecomposition(cern.colt.matrix.DoubleMatrix2D A) |
QRDecomposition(cern.colt.matrix.DoubleMatrix2D A,
boolean pivoting)
Construct the QR decomposition of A.
|
Modifier and Type | Method and Description |
---|---|
cern.colt.matrix.DoubleMatrix2D |
chol2inv()
Used for computing standard errors of parameter estimates for least squares; copies functionality of R chol2inv.
|
protected String |
diagnose() |
cern.colt.matrix.DoubleMatrix1D |
effects(cern.colt.matrix.DoubleMatrix1D y)
Compute effects matrix Q'y (as in Rb = Q'y).
|
cern.colt.matrix.DoubleMatrix2D |
effects(cern.colt.matrix.DoubleMatrix2D y)
Compute effects matrix Q'y (as in Rb = Q'y)
|
cern.colt.list.IntArrayList |
getPivotOrder() |
cern.colt.matrix.DoubleMatrix2D |
getQ()
Generates and returns the (economy-sized - first p columns only) orthogonal factor Q.
|
protected cern.colt.matrix.DoubleMatrix2D |
getQR()
For testing.
|
cern.colt.matrix.DoubleMatrix1D |
getQraux() |
cern.colt.matrix.DoubleMatrix2D |
getR()
Returns the upper triangular factor, R.
|
int |
getRank() |
double |
getTolerance() |
boolean |
hasFullRank()
Returns whether the matrix A has full rank.
|
boolean |
isPivoting() |
cern.colt.matrix.DoubleMatrix2D |
solve(cern.colt.matrix.DoubleMatrix2D y)
Least squares solution of A*X = y; returns X using the stored QR decomposition of A.
|
String |
toString()
Returns a String with (propertyName, propertyValue) pairs.
|
public QRDecomposition(cern.colt.matrix.DoubleMatrix2D A)
A
- the matrix to decompose, pivoting will be used.public QRDecomposition(cern.colt.matrix.DoubleMatrix2D A, boolean pivoting)
A
- the matrix to decomposepivoting
- set to false to obtain standard QR behaviour.public cern.colt.matrix.DoubleMatrix2D chol2inv()
public cern.colt.matrix.DoubleMatrix1D effects(cern.colt.matrix.DoubleMatrix1D y)
"Tthe effects are the uncorrelated single-degree-of-freedom values obtained by projecting the data onto the successive orthogonal subspaces generated by the QR decomposition during the fitting process. The first r (the rank of the model) are associated with coefficients and the remainder span the space of residuals (but are not associated with particular residuals)."
y
- vector Missing values are ignored, otherwise assumed to be of the right sizepublic cern.colt.matrix.DoubleMatrix2D effects(cern.colt.matrix.DoubleMatrix2D y)
y
- matrix of data, assumed to be of right size, missing values are not supportedpublic cern.colt.list.IntArrayList getPivotOrder()
public cern.colt.matrix.DoubleMatrix2D getQ()
public cern.colt.matrix.DoubleMatrix1D getQraux()
public cern.colt.matrix.DoubleMatrix2D getR()
public int getRank()
public double getTolerance()
public boolean hasFullRank()
public boolean isPivoting()
public cern.colt.matrix.DoubleMatrix2D solve(cern.colt.matrix.DoubleMatrix2D y)
y
- A matrix with as many rows as A and any number of columns. Least squares is fit for each column
of y.IllegalArgumentException
- if y.rows() != A.rows().IllegalArgumentException
- if !this.hasFullRank() (A is rank deficient). However,
rank-deficient cases are handled by pivoting, so if you are using pivoting you should not see this
happening.public String toString()
protected String diagnose()
protected cern.colt.matrix.DoubleMatrix2D getQR()
Copyright © 2003–2022 UBC Michael Smith Laboratories. All rights reserved.