OpenMS  2.7.0
Classes | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
GammaDistributionFitter Class Reference

Implements a fitter for the Gamma distribution. More...

#include <OpenMS/MATH/STATISTICS/GammaDistributionFitter.h>

Collaboration diagram for GammaDistributionFitter:
[legend]

Classes

struct  GammaDistributionFitResult
 struct to represent the parameters of a gamma distribution More...
 

Public Member Functions

 GammaDistributionFitter ()
 Default constructor. More...
 
virtual ~GammaDistributionFitter ()
 Destructor. More...
 
void setInitialParameters (const GammaDistributionFitResult &result)
 sets the gamma distribution start parameters b and p for the fitting More...
 
GammaDistributionFitResult fit (const std::vector< DPosition< 2 > > &points)
 Fits a gamma distribution to the given data points. More...
 

Protected Attributes

GammaDistributionFitResult init_param_
 

Private Member Functions

 GammaDistributionFitter (const GammaDistributionFitter &rhs)
 Copy constructor (not implemented to prevent usage) More...
 
GammaDistributionFitteroperator= (const GammaDistributionFitter &rhs)
 assignment operator (not implemented to prevent usage) More...
 

Detailed Description

Implements a fitter for the Gamma distribution.

This class fits a Gamma distribution to a number of data points. The results as well as the initial guess are specified using the struct GammaDistributionFitResult.

Note
We actually fit a slightly customized version of the gamma distribution that is 0.0 if the parameters b or p are <= 0.0. With this modification we can still use an unconstrained optimization algorithm.

Constructor & Destructor Documentation

◆ GammaDistributionFitter() [1/2]

Default constructor.

◆ ~GammaDistributionFitter()

virtual ~GammaDistributionFitter ( )
virtual

Destructor.

◆ GammaDistributionFitter() [2/2]

Copy constructor (not implemented to prevent usage)

Member Function Documentation

◆ fit()

GammaDistributionFitResult fit ( const std::vector< DPosition< 2 > > &  points)

Fits a gamma distribution to the given data points.

Parameters
pointsInput parameter which represents the point used for the fitting
Exceptions
Exception::UnableToFitis thrown if fitting cannot be performed

◆ operator=()

GammaDistributionFitter& operator= ( const GammaDistributionFitter rhs)
private

assignment operator (not implemented to prevent usage)

◆ setInitialParameters()

void setInitialParameters ( const GammaDistributionFitResult result)

sets the gamma distribution start parameters b and p for the fitting

Member Data Documentation

◆ init_param_

GammaDistributionFitResult init_param_
protected