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