IFitter
hep.aida

Interface IFitter

  • All Known Subinterfaces:
    IDevFitter, IExtFitter
    All Known Implementing Classes:
    Fitter


    public interface IFitter
    Fitter performs fits, scans and computes contours. Fitter never stores association to the data and functions which are used for fitting. Results of the fit are availabe in the IFitResult object, which also remebers the initial fit configuration.
    • Method Detail

      • fit

        IFitResult fit(IFitData fitData,             IFunction func)
        Fit an IFunction to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        func - The IFunction to fit on the data. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IFitData fitData,             IFunction func,             String range)
        Fit an IFunction to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        func - The IFunction to fit on the data.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IFitData d,             String model)
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        model - The string defining the function to be used. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IFitData d,             String model,             String range)
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        model - The string defining the function to be used.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IFitData d,             String model,             double[] initialParameters)
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IFitData d,             String model,             double[] initialParameters,             String range)
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Parameters:
        fitData - The IFitData to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the results of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             IFunction func)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        func - The IFunction to fit on the data. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             IFunction func,             String range)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        func - The IFunction to fit on the data.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             String model)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        model - The string defining the function to be used. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             String model,             String range)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        model - The string defining the function to be used.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             String model,             double[] initialParameters)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IBaseHistogram hist,             String model,             double[] initialParameters,             String range)
        Shortcut to fit an IBaseHistogram directly with an IFunction. The dimension of the IBaseHistogram must match the dimension of the IFunction. IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
        Parameters:
        hist - The IBaseHistogram to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             IFunction f)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        func - The IFunction to fit on the data. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             IFunction f,             String range)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        func - The IFunction to fit on the data.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             String model)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        model - The string defining the function to be used. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             String model,             String range)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        model - The string defining the function to be used.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             String model,             double[] initialParameters)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function. multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        IFitResult fit(IDataPointSet dataPointSet,             String model,             double[] initialParameters,             String range)
        Shortcut to fit an IDataPointSet directly with an IFunction. The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1. This are binned fits only; the last coordinate of the IDataPointSet is used as the "height" in a fit to an IBaseHistogram.
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        model - The string defining the function to be used.
        initialParameters - The array of the initial parameter values; its size must match the number of parameters in the function.
        range - The range over which to perform the fit. It is possible to spedify multiple ranges for more than one dimension: "x:(-1.,0.),(2.,3.) y:(-5,5)" For a 1-d fit it is possible to omit the axis label: "(-1,0),(2,3.)". Open ranges are defined by omitting the desired bound: "(,0)" or "(0,)" stand for less than zero and greater than zero respectively.
        Returns:
        The IFitResult containing the result of the fit.
      • setEngine

        void setEngine(String name)               throws IllegalArgumentException
        Set the optimization engine which is used internally for fitting.
        Parameters:
        name - The name of the optimizer engine. Examples of predefined engines: "minuit". The engine name is case-insensitive. Different engines are provided by different implementations.
        Throws:
        IllegalArgumentException - If the name does not correspond to a valid engine.
      • engineName

        String engineName()
        Get the name of the engine currently in use.
        Returns:
        The name of the optimizer engine used by the IFitter.
      • fitParameterSettings

        IFitParameterSettings fitParameterSettings(String name)
        Access to fit parameter settings. FitParameterSettings object belongs to and is managed by the fitter. Fitter implementation takes care that the returned reference is valid thru the lifetime of fitter. User can set the settings of the parameters independently of the parameters of the fitted function. Setting for parameters unknown in the function and set in the fitter are ignored in the fit. If settings are not explicitly set in the fitter, their default values are attached to function parameters during the fit.
      • listParameterSettings

        String[] listParameterSettings()
        Get a vector of names of all parameter settings defined in the fitter.
      • resetParameterSettings

        void resetParameterSettings()
        Reset all parameter settings which fitter remebers.
      • constraints

        String[] constraints()
      • resetConstraints

        void resetConstraints()
        Reset all the constraints.
      • setFitMethod

        void setFitMethod(String name)                  throws IllegalArgumentException
        Set the fit method type. Examples of pre-defined methods: "chi2", "ml". The method names are case-insensitive.
        Parameters:
        name - The name of the fit method.
        Throws:
        IllegalArgumentException - If the name does not correspond to a valid fit method.
      • fitMethodName

        String fitMethodName()
        Get the name of the fit method currently in use.
        Returns:
        The name of the fit method.
      • setUseFunctionGradient

        void setUseFunctionGradient(boolean useGrad)                            throws IllegalArgumentException
        Choose between using or not using the analytical derivatives if provided by the function.
        Parameters:
        useGrad - If true the IFitter will use the analytical derivatives if provided by the IFunction.
        Throws:
        IllegalArgumentException
      • useFunctionGradient

        boolean useFunctionGradient()
        Check if the IFitter is set to use the analytical derivatives provided by the IFunction.
        Returns:
        true if the IFitter uses the analytical derivatives.

SCaVis 2.0 © jWork.ORG