Class MultiVariateFitter

java.lang.Object
com.irurueta.numerical.fitting.Fitter
com.irurueta.numerical.fitting.MultiVariateFitter
Direct Known Subclasses:
LevenbergMarquardtMultiVariateFitter

public abstract class MultiVariateFitter extends Fitter
Base class to fit a multi variate function [y1, y2, ...] = f([x1, x2, ...]) by using provided data (x, y).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double[]
    Estimated parameters of linear single dimensional function.
    protected double
    Estimated chi square value of input data.
    protected com.irurueta.algebra.Matrix
    Covariance of estimated parameters of linear single dimensional function.
    protected int
    Number of samples (x, y) in provided input data.
    protected double[]
    Standard deviations of each pair of points (x, y).
    protected com.irurueta.algebra.Matrix
    Input points x where a multidimensional function f(x1, x2, ...) is evaluated where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
    protected com.irurueta.algebra.Matrix
    Result of evaluation of multi variate function f(x1, x2, ...) at provided x points.

    Fields inherited from class com.irurueta.numerical.fitting.Fitter

    resultAvailable
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
    protected
    MultiVariateFitter(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double sig)
    Constructor.
    protected
    MultiVariateFitter(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double[] sig)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns estimated parameters of linear single dimensional function.
    double
    Returns estimated chi square value of input data.
    com.irurueta.algebra.Matrix
    Returns covariance of estimated parameters of linear single dimensional function.
    double[]
    Returns standard deviations of each pair of points (x,y).
    com.irurueta.algebra.Matrix
    Returns input points x where a multi variate function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
    com.irurueta.algebra.Matrix
    Returns result of evaluation of multi variate function f(x) at provided x points.
    final void
    setInputData(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double sig)
    Sets required input data to start function fitting and assuming constant standard deviation errors in input data.
    final void
    setInputData(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double[] sig)
    Sets required input data to start function fitting.

    Methods inherited from class com.irurueta.numerical.fitting.Fitter

    fit, isReady, isResultAvailable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      protected com.irurueta.algebra.Matrix x
      Input points x where a multidimensional function f(x1, x2, ...) is evaluated where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
    • y

      protected com.irurueta.algebra.Matrix y
      Result of evaluation of multi variate function f(x1, x2, ...) at provided x points. Each row contains the function evaluation for a given point x, and each column contains values for each output variable f1, f2, ...
    • sig

      protected double[] sig
      Standard deviations of each pair of points (x, y).
    • ndat

      protected int ndat
      Number of samples (x, y) in provided input data.
    • a

      protected double[] a
      Estimated parameters of linear single dimensional function.
    • covar

      protected com.irurueta.algebra.Matrix covar
      Covariance of estimated parameters of linear single dimensional function.
    • chisq

      protected double chisq
      Estimated chi square value of input data.
  • Constructor Details

    • MultiVariateFitter

      protected MultiVariateFitter()
      Constructor.
    • MultiVariateFitter

      protected MultiVariateFitter(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double[] sig)
      Constructor.
      Parameters:
      x - input points x where a multi variate function f(x1, x2, ...) is evaluated.
      y - result of evaluation of multi variate 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.
    • MultiVariateFitter

      protected MultiVariateFitter(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double sig)
      Constructor.
      Parameters:
      x - input points x where a multi variate function f(x1, x2, ...) is evaluated.
      y - result of evaluation of multi variate 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.
  • Method Details

    • getX

      public com.irurueta.algebra.Matrix getX()
      Returns input points x where a multi variate function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
      Returns:
      input point x.
    • getY

      public com.irurueta.algebra.Matrix getY()
      Returns result of evaluation of multi variate function f(x) at provided x points. This is provided as input data along with x array.
      Returns:
      result of evaluation.
    • getSig

      public double[] getSig()
      Returns standard deviations of each pair of points (x,y).
      Returns:
      standard deviations of each pair of points (x,y).
    • setInputData

      public final void setInputData(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double[] sig)
      Sets required input data to start function fitting.
      Parameters:
      x - input points x where a multi variate function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
      y - result of evaluation of multi variate function f(x1, x2, ...) at provided x points. This is provided as input data along with x array.
      sig - standard deviations of each pair of points (x,y).
      Throws:
      IllegalArgumentException - if provided arrays don't have the same size.
    • setInputData

      public final void setInputData(com.irurueta.algebra.Matrix x, com.irurueta.algebra.Matrix y, double sig)
      Sets required input data to start function fitting and assuming constant standard deviation errors in input data.
      Parameters:
      x - input points x where a multi variate function f(x1, x2, ...) is evaluated and where each column of the matrix represents each dimension of the point and each row is related to each sample corresponding to provided y pairs of values.
      y - result of evaluation of multi variate function f(x1, x2, ...) at provided x points. This is provided as input data along with x array.
      sig - standard deviations of each pair of points (x,y).
      Throws:
      IllegalArgumentException - if provided arrays don't have the same size.
    • getA

      public double[] getA()
      Returns estimated parameters of linear single dimensional function.
      Returns:
      estimated parameters.
    • getCovar

      public com.irurueta.algebra.Matrix getCovar()
      Returns covariance of estimated parameters of linear single dimensional function.
      Returns:
      covariance of estimated parameters.
    • getChisq

      public double getChisq()
      Returns estimated chi square value of input data.
      Returns:
      estimated chi square value of input data.