Fitter
hep.aida.ref.fitter

Class Fitter

    • Constructor Detail

      • Fitter

        public Fitter(String fitMethodType,      String engineType,      String options)       throws IllegalArgumentException
        Create a new Fitter specifying the underlying optimizing engine.
        Parameters:
        fitMethodType - The type of fitter.
        engineType - The type of optimizer to use.
        Throws:
        IllegalArgumentException - if the engineType does not exist.
    • Method Detail

      • setEngine

        public void setEngine(String engineType)               throws IllegalArgumentException
        Description copied from interface: IFitter
        Set the optimization engine which is used internally for fitting.
        Specified by:
        setEngine in interface IFitter
        Parameters:
        engineType - 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

        public String engineName()
        Description copied from interface: IFitter
        Get the name of the engine currently in use.
        Specified by:
        engineName in interface IFitter
        Returns:
        The name of the optimizer engine used by the IFitter.
      • setFitMethod

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

        public String fitMethodName()
        Description copied from interface: IFitter
        Get the name of the fit method currently in use.
        Specified by:
        fitMethodName in interface IFitter
        Returns:
        The name of the fit method.
      • fitParameterSettings

        public IFitParameterSettings fitParameterSettings(String name)
        Description copied from interface: IFitter
        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.
        Specified by:
        fitParameterSettings in interface IFitter
      • listParameterSettings

        public String[] listParameterSettings()
        Description copied from interface: IFitter
        Get a vector of names of all parameter settings defined in the fitter.
        Specified by:
        listParameterSettings in interface IFitter
      • resetParameterSettings

        public void resetParameterSettings()
        Description copied from interface: IFitter
        Reset all parameter settings which fitter remebers.
        Specified by:
        resetParameterSettings in interface IFitter
      • fit

        public IFitResult fit(IFitData d,             IFunction originalFunction)
        Description copied from interface: IFitter
        Fit an IFunction to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        Parameters:
        d - The IFitData to be fitted.
        originalFunction - 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

        public IFitResult fit(IFitData d,             IFunction originalFunction,             String range)
        Description copied from interface: IFitter
        Fit an IFunction to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        Parameters:
        d - The IFitData to be fitted.
        originalFunction - 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

        public IFitResult fit(IBaseHistogram h,             IFunction f)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - The IBaseHistogram to be fitted.
        f - 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

        public IFitResult fit(IBaseHistogram h,             IFunction f,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - The IBaseHistogram to be fitted.
        f - 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

        public IFitResult fit(IBaseHistogram h,             String model)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - 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

        public IFitResult fit(IBaseHistogram h,             String model,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - 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

        public IFitResult fit(IBaseHistogram h,             String model,             double[] initialParameters)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - 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

        public IFitResult fit(IBaseHistogram h,             String model,             double[] initialParameters,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        h - 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

        public IFitResult fit(IDataPointSet dataPointSet,             IFunction f)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        Returns:
        The IFitResult containing the result of the fit.
      • fit

        public IFitResult fit(IDataPointSet dataPointSet,             IFunction f,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        Parameters:
        dataPointSet - The IDataPointSet to be fitted.
        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

        public IFitResult fit(IDataPointSet dataPointSet,             String model)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IDataPointSet dataPointSet,             String model,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IDataPointSet dataPointSet,             String model,             double[] initialParameters)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IDataPointSet dataPointSet,             String model,             double[] initialParameters,             String range)
        Description copied from interface: IFitter
        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.
        Specified by:
        fit in interface IFitter
        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.
      • fit

        public IFitResult fit(IFitData d,             String model,             double[] initialParameters)
        Description copied from interface: IFitter
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IFitData d,             String model,             double[] initialParameters,             String range)
        Description copied from interface: IFitter
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IFitData d,             String model)
        Description copied from interface: IFitter
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        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

        public IFitResult fit(IFitData d,             String model,             String range)
        Description copied from interface: IFitter
        Fit a given model to an IFitData. The result of the fit is an IFitResult.
        Specified by:
        fit in interface IFitter
        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.
      • resetConstraints

        public void resetConstraints()
        Description copied from interface: IFitter
        Reset all the constraints.
        Specified by:
        resetConstraints in interface IFitter
      • useFunctionGradient

        public boolean useFunctionGradient()
        Description copied from interface: IFitter
        Check if the IFitter is set to use the analytical derivatives provided by the IFunction.
        Specified by:
        useFunctionGradient in interface IFitter
        Returns:
        true if the IFitter uses the analytical derivatives.
      • setUseFunctionGradient

        public void setUseFunctionGradient(boolean useGradient)
        Description copied from interface: IFitter
        Choose between using or not using the analytical derivatives if provided by the function.
        Specified by:
        setUseFunctionGradient in interface IFitter
        Parameters:
        useGradient - If true the IFitter will use the analytical derivatives if provided by the IFunction.

SCaVis 1.8 © jWork.org