vec_math
Class AbstractGradientModel

java.lang.Object
  extended by vec_math.AbstractDataModel
      extended by vec_math.AbstractGradientModel
All Implemented Interfaces:
DataModel, GradientModel
Direct Known Subclasses:
HarmonicFit.HarmonicModel, LevenbergMarquardt.LMSineModel, LevenbergMarquardt.SinusModel, MultipleFrequencyFit.FourierComponents, OrbitModel, Overscan.WifsipOverscan

public abstract class AbstractGradientModel
extends AbstractDataModel
implements GradientModel

This class is designed to work together with the LevenbergMarquardt class. Data models that should be optimized with the latter class should extends this class. Additionally to an abstract data model, we also have to supply the gradient matrix via GradientModel.getGradientMatrix(vec_math.VectorG).


Nested Class Summary
 
Nested classes/interfaces inherited from class vec_math.AbstractDataModel
AbstractDataModel.Construct, AbstractDataModel.LocalM
 
Field Summary
 
Fields inherited from class vec_math.AbstractDataModel
sigma, x, y
 
Constructor Summary
protected AbstractGradientModel(VectorG[] times, double[] y, double[] err)
          Chains.
 
Method Summary
static void check(AbstractGradientModel fit, VectorG exact)
          Check the gradient matrix with the exact solution.
static void check(AbstractGradientModel fit, VectorG exact, double da)
          Check the gradient matrix with the exact solution.
static VectorG getNegativeChi2HalfGradient(GradientModel grad, VectorG a)
          Returns half the negativ gradient of chi-square of this model with respect to the model parameters.
 VectorG getNegativeChi2HalfGradient(VectorG a)
          Returns half the negativ gradient of chi-square of this model with respect to the model parameters.
static QuadMatrix getPseudoHessian(GradientModel grad, VectorG a)
          Returns the pseudo-hessian matrix consiting of the first derivatives only for the given set of parameters.
 QuadMatrix getPseudoHessian(VectorG a)
          Returns the pseudo-hessian matrix consiting of the first derivatives only for the given set of parameters.
static VectorG LevenbergMarquardtSolver(GradientModel exp, VectorG start)
          We use a LevenbergMarquardt in standard form to solve for a minimum model.
 
Methods inherited from class vec_math.AbstractDataModel
getChiSquareModel, getChiSquareModel, getLorentzianModel, getMeasureCount, getMeasurementErrors, getMeasures, getModel, getModel, getResiduals, getResiduals, getRms, getRobustModel, getTimes, getTotalErrors, LorentzianSolver, RobustSolver, SimplexSolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vec_math.GradientModel
getGradientMatrix
 
Methods inherited from interface vec_math.DataModel
evaluateModel, getMeasureCount, getMeasurementErrors, getMeasures, getModel, getParameterCount, getResiduals, getTimes, getTotalErrors
 

Constructor Detail

AbstractGradientModel

protected AbstractGradientModel(VectorG[] times,
                                double[] y,
                                double[] err)
Chains.

Method Detail

getPseudoHessian

public static QuadMatrix getPseudoHessian(GradientModel grad,
                                          VectorG a)
Returns the pseudo-hessian matrix consiting of the first derivatives only for the given set of parameters.


getPseudoHessian

public QuadMatrix getPseudoHessian(VectorG a)
Returns the pseudo-hessian matrix consiting of the first derivatives only for the given set of parameters.


getNegativeChi2HalfGradient

public VectorG getNegativeChi2HalfGradient(VectorG a)
Returns half the negativ gradient of chi-square of this model with respect to the model parameters.


getNegativeChi2HalfGradient

public static VectorG getNegativeChi2HalfGradient(GradientModel grad,
                                                  VectorG a)
Returns half the negativ gradient of chi-square of this model with respect to the model parameters.


check

public static void check(AbstractGradientModel fit,
                         VectorG exact)
Check the gradient matrix with the exact solution.


check

public static void check(AbstractGradientModel fit,
                         VectorG exact,
                         double da)
Check the gradient matrix with the exact solution.


LevenbergMarquardtSolver

public static VectorG LevenbergMarquardtSolver(GradientModel exp,
                                               VectorG start)
We use a LevenbergMarquardt in standard form to solve for a minimum model.