public static class ALS.NormalEquation
extends Object
implements scala.Serializable
minimize \sum,,i,, c,,i,, (a,,i,,^T^ x - b,,i,,)^2^ + lambda * x^T^ x.
Its normal equation is given by
\sum,,i,, c,,i,, (a,,i,, a,,i,,^T^ x - b,,i,, a,,i,,) + lambda * x = 0.
Constructor and Description |
---|
ALS.NormalEquation(int k) |
Modifier and Type | Method and Description |
---|---|
ALS.NormalEquation |
add(float[] a,
double b,
double c)
Adds an observation.
|
double[] |
ata()
A^T^ * A
|
double[] |
atb()
A^T^ * b
|
int |
k() |
ALS.NormalEquation |
merge(ALS.NormalEquation other)
Merges another normal equation object.
|
void |
reset()
Resets everything to zero, which should be called after each solve.
|
int |
triK()
Number of entries in the upper triangular part of a k-by-k matrix.
|
public int k()
public int triK()
public double[] ata()
public double[] atb()
public ALS.NormalEquation add(float[] a, double b, double c)
public ALS.NormalEquation merge(ALS.NormalEquation other)
public void reset()