Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
koheiw committed Aug 21, 2024
1 parent 6fdb999 commit aa561d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lda.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void LDA::estimate() {
}
}

int change, change_pv = 0;
int change, change__ = 0; // current and previous topic change
auto start = std::chrono::high_resolution_clock::now();
int iter_inc = 10;
std::mutex mutex_sync;
Expand Down Expand Up @@ -350,7 +350,7 @@ void LDA::estimate() {
});
#endif
if (iter > 0 && iter % 100 == 0) {
double delta = (double)(change_pv - change) / (double)(iter_inc * N);
double delta = (double)(change__ - change) / (double)(iter_inc * N);
if (verbose) {
auto end = std::chrono::high_resolution_clock::now();
auto diff = std::chrono::duration<double, std::milli>(end - start);
Expand All @@ -362,7 +362,7 @@ void LDA::estimate() {
}
if (iter >= max_iter)
break;
change_pv = change;
change__ = change;
iter += iter_inc;
}
if (verbose)
Expand Down

0 comments on commit aa561d6

Please sign in to comment.