OpenMS
Loading...
Searching...
No Matches
GumbelMaxLikelihoodFitter.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Julianus Pfeuffer $
6// $Authors: Julianus Pfeuffer $
7// --------------------------------------------------------------------------
8//
9#pragma once
10
12#include <vector>
13
14
15namespace OpenMS
16{
17 namespace Math
18 {
31 class OPENMS_DLLAPI GumbelMaxLikelihoodFitter
32 {
33
34public:
35
38 {
39 GumbelDistributionFitResult(double local_a, double local_b) :
40 a(local_a),
41 b(local_b)
42 {
43 }
44
46 double a;
48 double b;
49
50 double log_eval_no_normalize(double x) const;
51 };
52
59
62
72 GumbelDistributionFitResult fitWeighted(const std::vector<double> & x, const std::vector<double> & w);
73
74protected:
75
77
78private:
83 };
84 }
85}
86
Implements a fitter for the Gumbel distribution.
Definition GumbelMaxLikelihoodFitter.h:32
virtual ~GumbelMaxLikelihoodFitter()
Destructor.
GumbelMaxLikelihoodFitter(const GumbelMaxLikelihoodFitter &rhs)
Copy constructor (not implemented)
GumbelDistributionFitResult fitWeighted(const std::vector< double > &x, const std::vector< double > &w)
Fits a gumbel distribution to the given data x values. Fills a weighted histogram first and generates...
GumbelDistributionFitResult init_param_
Definition GumbelMaxLikelihoodFitter.h:76
GumbelMaxLikelihoodFitter & operator=(const GumbelMaxLikelihoodFitter &rhs)
assignment operator (not implemented)
GumbelMaxLikelihoodFitter(GumbelDistributionFitResult init)
Default constructor.
GumbelMaxLikelihoodFitter()
Default constructor.
void setInitialParameters(const GumbelDistributionFitResult &result)
sets the gumbel distribution start parameters a and b for the fitting
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
struct to represent the parameters of a gumbel distribution
Definition GumbelMaxLikelihoodFitter.h:38
double a
location parameter a
Definition GumbelMaxLikelihoodFitter.h:46
double b
scale parameter b
Definition GumbelMaxLikelihoodFitter.h:48
GumbelDistributionFitResult(double local_a, double local_b)
Definition GumbelMaxLikelihoodFitter.h:39