public final class Gram extends water.Iced<Gram>
Modifier and Type | Class and Description |
---|---|
static class |
Gram.Cholesky |
static class |
Gram.CollinearColumnsException |
static class |
Gram.GramTask
Task to compute gram matrix normalized by the number of observations (not counting rows with NAs).
|
static class |
Gram.InPlaceCholesky |
static class |
Gram.NonSPDMatrixException |
static class |
Gram.OuterGramTask
Task to compute outer product of a matrix normalized by the number of observations (not counting rows with NAs).
|
Modifier and Type | Field and Description |
---|---|
double[] |
_diag |
double |
_diagAdded |
int |
_diagN |
double[][] |
_frame2DProduce |
double[][] |
_xx |
Constructor and Description |
---|
Gram(DataInfo dinfo) |
Gram(int N,
int diag,
int dense,
int sparse,
boolean hasIntercept) |
Modifier and Type | Method and Description |
---|---|
void |
add(Gram grm) |
void |
addDiag(double d) |
void |
addDiag(double[] ds) |
void |
addDiag(double d,
boolean add2Intercept) |
void |
addRow(DataInfo.Row row,
double w) |
void |
addRowDense(DataInfo.Row row,
double w) |
void |
addRowSparse(DataInfo.Row r,
double w) |
Gram.Cholesky |
cholesky(Gram.Cholesky chol) |
Gram.Cholesky |
cholesky(Gram.Cholesky chol,
boolean parallelize,
java.lang.String id)
Compute the Cholesky decomposition.
|
Gram |
deep_clone() |
double |
diagSum() |
void |
dropCols(int[] cols) |
void |
dropIntercept() |
int[] |
findZeroCols() |
int |
fullN() |
double |
get(int i,
int j) |
double[][] |
getXX() |
double[][] |
getXX(boolean lowerDiag,
boolean icptFist) |
double[][] |
getXX(double[][] xalloc) |
double[][] |
getXX(double[][] xalloc,
boolean lowerDiag,
boolean icptFist) |
boolean |
hasNaNsOrInfs() |
void |
mul(double x) |
double[] |
mul(double[] x) |
void |
mul(double[] x,
double[] res) |
Gram.Cholesky |
qrCholesky(java.util.ArrayList<java.lang.Integer> dropped_cols,
boolean standardized)
Compute Cholesky decompostion by computing partial QR decomposition (R == LU).
|
double |
sparseness() |
java.lang.String |
toString() |
public double[][] _xx
public double[] _diag
public double[][] _frame2DProduce
public int _diagN
public double _diagAdded
public Gram(DataInfo dinfo)
public Gram(int N, int diag, int dense, int sparse, boolean hasIntercept)
public void dropIntercept()
public Gram deep_clone()
public final int fullN()
public void addDiag(double[] ds)
public double get(int i, int j)
public void addDiag(double d)
public void addDiag(double d, boolean add2Intercept)
public double sparseness()
public double diagSum()
public Gram.Cholesky qrCholesky(java.util.ArrayList<java.lang.Integer> dropped_cols, boolean standardized)
dropped_cols
- - empty list which will be filled with collinear columns removed during computationpublic void dropCols(int[] cols)
public int[] findZeroCols()
public java.lang.String toString()
toString
in class java.lang.Object
public Gram.Cholesky cholesky(Gram.Cholesky chol)
public Gram.Cholesky cholesky(Gram.Cholesky chol, boolean parallelize, java.lang.String id)
chol
- public double[][] getXX()
public double[][] getXX(boolean lowerDiag, boolean icptFist)
public double[][] getXX(double[][] xalloc)
public double[][] getXX(double[][] xalloc, boolean lowerDiag, boolean icptFist)
public void add(Gram grm)
public final boolean hasNaNsOrInfs()
public final void addRowSparse(DataInfo.Row r, double w)
public final void addRow(DataInfo.Row row, double w)
public final void addRowDense(DataInfo.Row row, double w)
public void mul(double x)
public double[] mul(double[] x)
public void mul(double[] x, double[] res)