yat  0.21pre
NegativeBinomialFitter.h
1 #ifndef theplu_yat_regression_detail_negative_binomial_fitter
2 #define theplu_yat_regression_detail_negative_binomial_fitter
3 
4 // $Id: NegativeBinomialFitter.h 3669 2017-07-27 07:42:09Z peter $
5 
6 /*
7  Copyright (C) 2017 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 #include <yat/utility/Matrix.h>
26 #include <yat/utility/Vector.h>
27 
28 namespace theplu {
29 namespace yat {
30 namespace regression {
31 namespace detail {
32 
34 
35  class NegativeBinomialFitter
36  {
37  public:
38  NegativeBinomialFitter(const utility::Matrix& X,
39  const utility::VectorBase& y,
40  utility::Vector& beta,
41  utility::Matrix& covariance,
42  double& alpha);
43  private:
44  double alpha(void) const;
45  void update_mu(void);
46  double deviate(void) const;
47  void init(void);
48 
49  double& alpha_;
50  utility::Vector& beta_;
51  utility::Matrix& covariance_;
52  const utility::Matrix& X_;
53  const utility::VectorBase& y_;
54  utility::Vector mu_;
55  utility::Vector eta_;
56  };
57 
59 
60 
61 }}}}
62 
63 #endif
The Department of Theoretical Physics namespace as we define it.

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14