public class GeneralizedLeastSquare extends Object
| Constructor and Description |
|---|
GeneralizedLeastSquare()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T> GeneralizedLeastSquareResults<T> |
solve(List<T> x,
List<Double> y,
List<Double> sigma,
List<Function<T,Double>> basisFunctions) |
<T> GeneralizedLeastSquareResults<T> |
solve(List<T> x,
List<Double> y,
List<Double> sigma,
List<Function<T,Double>> basisFunctions,
double lambda,
int differenceOrder)
Generalised least square with penalty on (higher-order) finite differences of weights.
|
<T> GeneralizedLeastSquareResults<T> |
solve(List<T> x,
List<Double> y,
List<Double> sigma,
List<Function<T,Double>> basisFunctions,
int[] sizes,
double[] lambda,
int[] differenceOrder)
Specialist method used mainly for solving multidimensional P-spline problems where the basis functions
(B-splines) span a N-dimension space, and the weights sit on an N-dimension
grid and are treated as a N-order tensor rather than a vector, so k-order differencing is
done for each tensor index while varying the other indices.
|
<T> GeneralizedLeastSquareResults<T> |
solve(T[] x,
double[] y,
double[] sigma,
List<Function<T,Double>> basisFunctions) |
<T> GeneralizedLeastSquareResults<T> |
solve(T[] x,
double[] y,
double[] sigma,
List<Function<T,Double>> basisFunctions,
double lambda,
int differenceOrder)
Generalised least square with penalty on (higher-order) finite differences of weights.
|
public <T> GeneralizedLeastSquareResults<T> solve(T[] x, double[] y, double[] sigma, List<Function<T,Double>> basisFunctions)
T - The type of the independent variables (e.g. Double, double[], DoubleArray etc)x - independent variablesy - dependent (scalar) variablessigma - (Gaussian) measurement error on dependent variablesbasisFunctions - set of basis functions - the fitting function is formed by these basis functions times a set of weightspublic <T> GeneralizedLeastSquareResults<T> solve(T[] x, double[] y, double[] sigma, List<Function<T,Double>> basisFunctions, double lambda, int differenceOrder)
T - The type of the independent variables (e.g. Double, double[], DoubleArray etc)x - independent variablesy - dependent (scalar) variablessigma - (Gaussian) measurement error on dependent variablesbasisFunctions - set of basis functions - the fitting function is formed by these basis functions times a set of weightslambda - strength of penalty functiondifferenceOrder - difference order between weights used in penalty functionpublic <T> GeneralizedLeastSquareResults<T> solve(List<T> x, List<Double> y, List<Double> sigma, List<Function<T,Double>> basisFunctions)
T - The type of the independent variables (e.g. Double, double[], DoubleArray etc)x - independent variablesy - dependent (scalar) variablessigma - (Gaussian) measurement error on dependent variablesbasisFunctions - set of basis functions - the fitting function is formed by these basis functions times a set of weightspublic <T> GeneralizedLeastSquareResults<T> solve(List<T> x, List<Double> y, List<Double> sigma, List<Function<T,Double>> basisFunctions, double lambda, int differenceOrder)
T - The type of the independent variables (e.g. Double, double[], DoubleArray etc)x - independent variablesy - dependent (scalar) variablessigma - (Gaussian) measurement error on dependent variablesbasisFunctions - set of basis functions - the fitting function is formed by these basis functions times a set of weightslambda - strength of penalty functiondifferenceOrder - difference order between weights used in penalty functionpublic <T> GeneralizedLeastSquareResults<T> solve(List<T> x, List<Double> y, List<Double> sigma, List<Function<T,Double>> basisFunctions, int[] sizes, double[] lambda, int[] differenceOrder)
T - The type of the independent variables (e.g. Double, double[], DoubleArray etc)x - independent variablesy - dependent (scalar) variablessigma - (Gaussian) measurement error on dependent variablesbasisFunctions - set of basis functions - the fitting function is formed by these basis functions times a set of weightssizes - The size the weights tensor in each dimension (the product of this must equal the number of basis functions)lambda - strength of penalty function in each dimensiondifferenceOrder - difference order between weights used in penalty function for each dimensionCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.