trans.cel
Class SplineScalar
java.lang.Object
trans.cel.SplineScalar
- public class SplineScalar
- extends java.lang.Object
Generates multiplicative scalars based on a set of points using a combination of a cubic spline for values within the provided points
and linear regression for points outside the value range. Lagrange Interpolation might be something possibly more appropriate.
Assumes that each sucessive point is >= than last.
Constructor Summary |
SplineScalar(double[] modelPoints)
Assumes modelPoints are sorted min to max. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SplineScalar
public SplineScalar(double[] modelPoints)
- Assumes modelPoints are sorted min to max.
- Parameters:
modelPoints
- - the points that represent the average/ model you want to generate scalars for.
scalar
public double scalar(double testValue,
SplineScalar testScalar)
- Use to calculate a scaler that when multiplied by the testValue brings the testValue up to the model.
- Parameters:
testValue
- a non zero double
- Returns:
- scaler x testValue = model.
main
public static void main(java.lang.String[] test)
getLeftLR
public LinearRegression getLeftLR()
getModelPoints
public double[] getModelPoints()
getRightLR
public LinearRegression getRightLR()
getSpline
public CubicSpline getSpline()