Documentation of 'org.spaceroots.mantissa.fitting.AbstractCurveFitter' Java class
AbstractCurveFitter
org.spaceroots.mantissa.fitting

Class AbstractCurveFitter

    • Method Detail

      • addWeightedPair

        public void addWeightedPair(double weight,
                                    double x,
                                    double y)
        Add a weighted (x,y) pair to the sample.
        Parameters:
        weight - weight of this pair in the fit
        x - abscissa
        y - ordinate, we have y = f (x)
      • fit

        public double[] fit()
                     throws EstimationException
        Perform the fitting.

        This method compute the coefficients of the curve that best fit the sample of weighted pairs previously given through calls to the addWeightedPair method.

        Returns:
        coefficients of the curve
        Throws:
        EstimationException - if the fitting is not possible (for example if the sample has to few independant points)
      • getUnboundParameters

        public EstimatedParameter[] getUnboundParameters()
        Get the unbound parameters of the problem. For a curve fitting, none of the function coefficient is bound.
        Specified by:
        getUnboundParameters in interface EstimationProblem
        Returns:
        unbound parameters
      • valueAt

        public abstract double valueAt(double x)
        Get the value of the function at x according to the current parameters value.
        Parameters:
        x - abscissa at which the theoretical value is requested
        Returns:
        theoretical value at x
      • partial

        public abstract double partial(double x,
                                       EstimatedParameter p)
        Get the derivative of the function at x with respect to parameter p.
        Parameters:
        x - abscissa at which the partial derivative is requested
        p - parameter with respect to which the derivative is requested
        Returns:
        partial derivative

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.