From 32e41b7b010a442a87cd144c056bac2355eeef3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr> Date: Fri, 11 Jun 2010 16:51:08 +0200 Subject: [PATCH] Estimation DLL, LogLikelihoodMain: fixed bug (likelihood was not initialized to zero) --- mex/sources/estimation/LogLikelihoodMain.cc | 1 + mex/sources/estimation/LogLikelihoodMain.hh | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/mex/sources/estimation/LogLikelihoodMain.cc b/mex/sources/estimation/LogLikelihoodMain.cc index 29ce8c0776..aa31d63d73 100644 --- a/mex/sources/estimation/LogLikelihoodMain.cc +++ b/mex/sources/estimation/LogLikelihoodMain.cc @@ -48,6 +48,7 @@ LogLikelihoodMain::~LogLikelihoodMain() double LogLikelihoodMain::compute(Matrix &steadyState, const Vector &estParams, Vector &deepParams, const MatrixConstView &data, Matrix &Q, Matrix &H, size_t start, int &info) { + double logLikelihood = 0; for (size_t i = 0; i < estSubsamples.size(); ++i) { VectorView vSteadyState = mat::get_col(steadyState, i); diff --git a/mex/sources/estimation/LogLikelihoodMain.hh b/mex/sources/estimation/LogLikelihoodMain.hh index a955b66fa8..70fea18bb2 100644 --- a/mex/sources/estimation/LogLikelihoodMain.hh +++ b/mex/sources/estimation/LogLikelihoodMain.hh @@ -29,7 +29,6 @@ class LogLikelihoodMain { private: - double logLikelihood; std::vector<EstimationSubsample> &estSubsamples; // reference to member of EstimatedParametersDescription LogLikelihoodSubSample logLikelihoodSubSample; Vector vll; // vector of all KF step likelihoods @@ -58,12 +57,6 @@ public: { return vll; }; - double - getLogLikelihood() - { - return logLikelihood; - }; - }; #endif // !defined(E126AEF5_AC28_400a_821A_3BCFD1BC4C22__INCLUDED_) -- GitLab