public class LinearAlgebraUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LinearAlgebraUtils.BMulInPlaceTask
Computes B = XY where X is n by k and Y is k by p, saving result in same frame
Input: [X,B] (large frame) passed to doAll, where we write to B
yt = Y' = transpose of Y (small matrix)
ncolX = number of columns in X
|
static class |
LinearAlgebraUtils.BMulTask
Computes B = XY where X is n by k and Y is k by p, saving result in new vecs
Input: dinfo = X (large frame) with dinfo._adaptedFrame passed to doAll
yt = Y' = transpose of Y (small matrix)
Output: XY (large frame) is n by p
|
static class |
LinearAlgebraUtils.ForwardSolve
Given lower triangular L, solve for Q in QL' = A (LQ' = A') using forward substitution
Dimensions: A is n by p, Q is n by p, R = L' is p by p
Input: [A,Q] (large frame) passed to doAll, where we write to Q
|
static class |
LinearAlgebraUtils.ForwardSolveInPlace
Given lower triangular L, solve for Q in QL' = A (LQ' = A') using forward substitution
Dimensions: A is n by p, Q is n by p, R = L' is p by p
Input: A (large frame) passed to doAll, where we overwrite each row of A with its row of Q
|
static class |
LinearAlgebraUtils.SMulTask
Computes A'Q where A is n by p and Q is n by k
Input: [A,Q] (large frame) passed to doAll
Output: atq = A'Q (small matrix) is \tilde{p} by k where \tilde{p} = number of cols in A with categoricals expanded
|
Modifier and Type | Field and Description |
---|---|
static hex.ToEigenVec |
toEigen |
Constructor and Description |
---|
LinearAlgebraUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
computeQ(water.Key<water.Job> jobKey,
DataInfo yinfo,
water.fvec.Frame ywfrm,
double[][] xx)
Solve for Q from Y = QR factorization and write into new frame
|
static void |
computeQInPlace(water.Key<water.Job> jobKey,
DataInfo yinfo)
Solve for Q from Y = QR factorization and write into Y frame
|
static double[][] |
computeR(water.Key<water.Job> jobKey,
DataInfo yinfo,
boolean transpose,
double[][] xx)
Get R = L' from Cholesky decomposition Y'Y = LL' (same as R from Y = QR)
|
static double[] |
expandRow(double[] row,
DataInfo dinfo,
double[] tmp,
boolean modify_numeric) |
static double[] |
forwardSolve(double[][] L,
double[] b) |
static int |
numColsExp(water.fvec.Frame fr,
boolean useAllFactorLevels)
Number of columns with categoricals expanded.
|
static water.fvec.Vec |
toEigen(water.fvec.Vec src) |
public static double[] forwardSolve(double[][] L, double[] b)
public static double[] expandRow(double[] row, DataInfo dinfo, double[] tmp, boolean modify_numeric)
public static double[][] computeR(water.Key<water.Job> jobKey, DataInfo yinfo, boolean transpose, double[][] xx)
jobKey
- Job key for Gram calculationyinfo
- DataInfo for Y matrixtranspose
- Should result be transposed to get L?public static double computeQ(water.Key<water.Job> jobKey, DataInfo yinfo, water.fvec.Frame ywfrm, double[][] xx)
jobKey
- Job key for Gram calculationyinfo
- DataInfo for Y matrixywfrm
- Input frame [Y,W] where we write into Wpublic static void computeQInPlace(water.Key<water.Job> jobKey, DataInfo yinfo)
jobKey
- Job key for Gram calculationyinfo
- DataInfo for Y matrixpublic static int numColsExp(water.fvec.Frame fr, boolean useAllFactorLevels)
public static water.fvec.Vec toEigen(water.fvec.Vec src)