public class Smooth extends Object
| Constructor and Description |
|---|
Smooth() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
interpolate(double[] x,
double[] y,
double[] xInterpolate)
Linearlly interpolate values from a given data set
Similar implementation of R's stats.approxfun(..., rule = 2) where values outside the interval ['min(x)',
'max(x)'] get the value at the closest data extreme.
|
static cern.colt.matrix.DoubleMatrix2D |
loessFit(cern.colt.matrix.DoubleMatrix2D xy) |
static cern.colt.matrix.DoubleMatrix2D |
loessFit(cern.colt.matrix.DoubleMatrix2D xy,
double bandwidth)
Computes a loess regression line to fit the data
|
static cern.colt.matrix.DoubleMatrix1D |
movingAverage(cern.colt.matrix.DoubleMatrix1D m,
int windowSize)
Simple moving average that sums the points "backwards".
|
public static cern.colt.matrix.DoubleMatrix1D movingAverage(cern.colt.matrix.DoubleMatrix1D m,
int windowSize)
m - windowSize - public static cern.colt.matrix.DoubleMatrix2D loessFit(cern.colt.matrix.DoubleMatrix2D xy)
xy - public static cern.colt.matrix.DoubleMatrix2D loessFit(cern.colt.matrix.DoubleMatrix2D xy,
double bandwidth)
xy - data to be fitbandwidth - the span of the smoother (from 2/n to 1 where n is the number of points in xy)public static double[] interpolate(double[] x,
double[] y,
double[] xInterpolate)
x - the training set of x valuesy - the training set of y valuesxInterpolate - the set of x values to interpolateCopyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.