Class MultiDimensionLinearFitter

Direct Known Subclasses:
SvdMultiDimensionLinearFitter

public abstract class MultiDimensionLinearFitter extends MultiDimensionFitter
Base class to fit provided multidimensional data (x1, x2, ..., y1, y2, ...) to a function made of a linear combination of functions used as a basis (i.e. f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...). Where f0, f1, ... is the function basis which ideally should be formed by orthogonal functions.
  • Field Details

    • evaluator

      Evaluator of functions
    • afunc

      protected double[] afunc
      Array where results of function evaluations are stored
    • ma

      protected int ma
      Number of function basis used as a linear combination of functions being fitted
  • Constructor Details

    • MultiDimensionLinearFitter

      MultiDimensionLinearFitter()
      Constructor
    • MultiDimensionLinearFitter

      protected MultiDimensionLinearFitter(com.irurueta.algebra.Matrix x, double[] y, double[] sig)
      Constructor
      Parameters:
      x - input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...
      y - result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x points
      sig - standard deviations of each pair of points (x, y)
      Throws:
      IllegalArgumentException - if provided matrix rows and arrays don't have the same length
    • MultiDimensionLinearFitter

      protected MultiDimensionLinearFitter(com.irurueta.algebra.Matrix x, double[] y, double sig)
      Constructor
      Parameters:
      x - input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...
      y - result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x points
      sig - standard deviation of all pair of points assuming that standard deviations are constant
      Throws:
      IllegalArgumentException - if provided matrix rows and arrays don't have the same length
    • MultiDimensionLinearFitter

      protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException
      Constructor
      Parameters:
      evaluator - evaluator to evaluate function at provided point and obtain the evaluation of function basis at such point
      Throws:
      FittingException - if evaluation fails
    • MultiDimensionLinearFitter

      protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double[] sig) throws FittingException
      Constructor
      Parameters:
      evaluator - evaluator to evaluate function at provided point and obtain the evaluation of function basis at such point
      x - input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...
      y - result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x points
      sig - standard deviations of each pair of points (x, y)
      Throws:
      FittingException - if evaluation fails
      IllegalArgumentException - if provided matrix rows and arrays don't have the same length
    • MultiDimensionLinearFitter

      protected MultiDimensionLinearFitter(LinearFitterMultiDimensionFunctionEvaluator evaluator, com.irurueta.algebra.Matrix x, double[] y, double sig) throws FittingException
      Constructor
      Parameters:
      evaluator - evaluator to evaluate function at provided point and obtain the evaluation of function basis at such point
      x - input points x where a linear multidimensional function f(x1, x2, ...) = a * f0(x1, x2, ...) + b * f1(x1, x2, ...) + ...
      y - result of evaluation of linear multidimensional function f(x1, x2, ...) at provided x points
      sig - standard deviation of all pair of points assuming that standard deviations are constant
      Throws:
      FittingException - if evaluation fails
      IllegalArgumentException - if provided matrix rows and arrays don't have the same length
  • Method Details

    • getFunctionEvaluator

      public LinearFitterMultiDimensionFunctionEvaluator getFunctionEvaluator()
      Returns function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point
      Returns:
      function evaluator
    • setFunctionEvaluator

      public void setFunctionEvaluator(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException
      Sets function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point
      Parameters:
      evaluator - function evaluator
      Throws:
      FittingException - if evaluation fails
    • internalSetFunctionEvaluator

      private void internalSetFunctionEvaluator(LinearFitterMultiDimensionFunctionEvaluator evaluator) throws FittingException
      Internal method to set function evaluator to evaluate function at a given point and obtain the evaluation of function basis at such point
      Parameters:
      evaluator - function evaluator
      Throws:
      FittingException - if evaluation fails
    • isReady

      public boolean isReady()
      Indicates whether provided instance has enough data to start the function fitting.
      Specified by:
      isReady in class Fitter
      Returns:
      true if this instance is ready to start the function fitting, false otherwise