public static final class MathUtils.BasicStats extends Iced
Constructor and Description |
---|
MathUtils.BasicStats(int n) |
Modifier and Type | Method and Description |
---|---|
void |
add(double w) |
void |
add(double[] x,
double w) |
void |
add(double x,
double w,
int i) |
void |
fillInZeros(long len,
double wsum)
To be called at the end to adjust for the skipped zeros (if using sparse).
|
double[] |
mean() |
double |
mean(int i) |
long |
nobs() |
void |
reduce(MathUtils.BasicStats bs) |
double[] |
sigma() |
double |
sigma(int i) |
boolean |
sparse() |
double[] |
variance() |
double |
variance(int i) |
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public void add(double w)
public void add(double x, double w, int i)
public void add(double[] x, double w)
public void fillInZeros(long len, double wsum)
len
- - number of (non-skipped) lines in the datasetwsum
- - sum of all weightspublic void reduce(MathUtils.BasicStats bs)
public double variance(int i)
public double[] variance()
public double sigma(int i)
public double[] sigma()
public double[] mean()
public double mean(int i)
public long nobs()
public boolean sparse()