Skip to content

Commit

Permalink
Correct use of index_max() result
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Nov 22, 2024
1 parent a8181b0 commit a09ae52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mlpack/methods/hmm/hmm_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ double HMM<Distribution>::Predict(const arma::mat& dataSeq,
{
arma::vec prob = logStateProb.col(t - 1) + logTransition.row(j).t();
index = prob.index_max();
logStateProb(j, t) = index + logProbs(t, j);
logStateProb(j, t) = prob[index] + logProbs(t, j);
stateSeqBack(j, t) = index;
}
}
Expand Down

0 comments on commit a09ae52

Please sign in to comment.