From 534e12beacb83144d7d305d5cabfc8a9272b1a75 Mon Sep 17 00:00:00 2001 From: Bo Li Date: Fri, 12 Aug 2011 13:13:49 -0500 Subject: [PATCH] fix one bug will lead using not the last theta value estimates --- EM.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/EM.cpp b/EM.cpp index 15dd117..5f9b8c0 100644 --- a/EM.cpp +++ b/EM.cpp @@ -571,6 +571,7 @@ void EM() { //calculate expected weights and counts using learned parameters updateModel = false; calcExpectedWeights = true; + for (int i = 0; i <= M; i++) probv[i] = theta[i]; for (int i = 0; i < nThreads; i++) { rc = pthread_create(&threads[i], &attr, E_STEP, (void*)(&fparams[i])); if (rc != 0) { fprintf(stderr, "Cannot create thread %d when calculate expected weights! (numbered from 0)\n", i); exit(-1); } -- 2.39.2