org.gersteinlab.regulation.model
Class PolynomialSqrDiff
java.lang.Object
org.gersteinlab.regulation.numeric.MultivariateFunction
org.gersteinlab.regulation.numeric.DifferentiableMultivariateFunction
org.gersteinlab.regulation.numeric.DoublyDifferentiableMultivariateFunction
org.gersteinlab.regulation.model.PolynomialSqrDiff
public class PolynomialSqrDiff
- extends DoublyDifferentiableMultivariateFunction
A function that equals the total squared difference between a polynomial
and some target values at a set of points, treating the coefficients of
the polynomial as the variables.
- Version:
- 1.0 (August 29, 2008)
Change History:
1.0 - Initial version
- Author:
- Kevin Yuk-Lap Yip
Constructor Summary |
PolynomialSqrDiff(double[] tIn,
double[] yIn)
Create the function with the given set of points and target
values. |
Method Summary |
double |
f(double[] a)
Evaluate the total squared difference at a point (i.e., a set of
polynomial coefficients). |
double[] |
gf(double[] a)
Evaluate the gradient of the function at a point (i.e., a set of
polynomial coefficients). |
double[][] |
hf(double[] a)
Evaluate the Hessian of the function at a point (i.e., a set of
polynomial coefficients). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolynomialSqrDiff
public PolynomialSqrDiff(double[] tIn,
double[] yIn)
- Create the function with the given set of points and target
values.
- Parameters:
tIn
- The pointsyIn
- The target values
f
public double f(double[] a)
- Evaluate the total squared difference at a point (i.e., a set of
polynomial coefficients).
- Overrides:
f
in class MultivariateFunction
- Parameters:
a
- The coefficients
- Returns:
- The squred difference
gf
public double[] gf(double[] a)
- Evaluate the gradient of the function at a point (i.e., a set of
polynomial coefficients).
- Overrides:
gf
in class DifferentiableMultivariateFunction
- Parameters:
a
- The point
- Returns:
- The gradient of the function at the point
hf
public double[][] hf(double[] a)
- Evaluate the Hessian of the function at a point (i.e., a set of
polynomial coefficients).
- Overrides:
hf
in class DoublyDifferentiableMultivariateFunction
- Parameters:
a
- The point
- Returns:
- The Hessian of the function at the point