Questions tagged [viterbi]

The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states—called the Viterbi path—that results in a sequence of observed events, especially in the context of Markov information sources and hidden Markov models. Use this tag for questions about this algorithm.

The Viterbi algorithm is a dynamic programming algorithm for finding the most likely sequence of hidden states—called the Viterbi path—that results in a sequence of observed events, especially in the context of Markov information sources and hidden Markov models.

The algorithm has found universal application in decoding the convolutional codes used in both CDMA and GSM digital cellular, dial-up modems, satellite, deep-space communications, and 802.11 wireless LANs. It is now also commonly used in speech recognition, speech synthesis, diarization,1 keyword spotting, computational linguistics, and bioinformatics. For example, in speech-to-text (speech recognition), the acoustic signal is treated as the observed sequence of events, and a string of text is considered to be the "hidden cause" of the acoustic signal. The Viterbi algorithm finds the most likely string of text given the acoustic signal. (src: Wikipedia)

84 questions
0
votes
2 answers

Using multiprocessing module to runs parallel processes where one is fed (dependent) by the other for Viterbi Algorithm

I have recently played around with Python's multiprocessing module to speed up the forward-backward algorithm for Hidden Markov Models as forward filtering and backward filtering can run independently. Seeing the run-time halve was awe-inspiring…
0
votes
1 answer

Calculating branch metric in Viterbi forward phase

I have been looking at some implementations of Viterbi decoders and noticed a strange way of calculating the branch metric (1): "BM is calculated by the product of information codewords c and hamming distance hd with R inputs." The input to the…
0
votes
1 answer

Which is better approach to implement Viterbi algorithm in c?

I want to implement the Viterbi algorithm for decoding convolutional codes. Would it be better to implement it using 2D arrays or using linked lists in C programming language. I am a newbie in C and would appreciate any help regarding which method…
Christy
  • 17
  • 4
0
votes
0 answers

Shortest Path Challenge

Given a graph with a start vertex S and end vertex E, how to find k shortest paths from S to E conditioned that all vertices must be visited exactly once? The graph can have cycles. Can someone please elaborate how to use Dijkstra or Viterbi…
0
votes
1 answer

Define hidden markov model for word

I'm attempting to define a hidden markov model and predict if given sequence of words is correct using Viterbi algorithm ( https://en.wikipedia.org/wiki/Viterbi_algorithm ). In order to aid understanding I've attempted to define the model paramters…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
0
votes
2 answers

How to find a matching string to a string from one text file in another text file?

I have two text files. Both of them have the same content but the formatting of each is different. In one file there are extra spaces between words or letters. There are different line breaks as well. For example: File1: The annotation framework we…
0
votes
0 answers

Viterbi algorithm post-treatment

I am running scripts for a project in Hidden Markov Model with 2 hiddens states at school. At some point, I use Viterbi's algrithm to find the most suitable sequences of hidden states. My output is a vector like that : c("1","1","1","2","2","1",…
Micawber
  • 707
  • 1
  • 5
  • 19
0
votes
1 answer

Viterbi algorithm in linear time

I have a problem where given a Hidden Markov model and the states S I need to find an algorithm that returns the most probable path through the Hidden Markov model for a given sequence X in time O(|S|). I was thinking of developing a graph where I…
0
votes
1 answer

Convolutiona code and viterbi decoding using matlab

i'm trying to encode and decode a simple message using Matlab. The message is denoted msg=[1 0 0 1 1 1 0 1]. the encoding step is fruitful but the decoding step " viterbi " return a binary string of zeros '0 0 0 0 0 0 0 0' not the initial msg.…
t.hicham
  • 45
  • 8
0
votes
1 answer

Can we apply Viterbi algorithm if there are cycles in a graph?

I am trying to solve a question which can be solved both by BFS and viterbi algorithm. But BFS might fail if there are cycles in the graph. So my question is viterbi algorithm cycle safe?
0
votes
2 answers

When using dynamic programming, capturing the entire path for a min-sum?

I am trying to use the Viterbi min-sum algorithm which tries to find the pathway through a bunch of nodes that minimizes the overall Hamming distance (fancy term for "xor two numbers and count the resulting bits") against some fixed input. I…
0
votes
1 answer

soft viterbi decoder not working properly

I have been working on viterbi decoder in matlab2009 on simple 1/2 rate convolutional encoder. Here is my code trel = poly2trellis(3,[7 5]); msg = [ 0 1 0 1 1 1 0 0 1 0 1 0 0 0 1 ]; code = convenc(msg,trel); % Traceback Length tblen = 5; ucode =…
Naveen
  • 5
  • 3
0
votes
0 answers

Viterbi algorithm in R - Number of the replaced elements is not a multiple of replacement length error

I'm trying to implement Viterbi algorithm in R. I've written the following code, viterbi_impl <- function(y,P,B,pi){ # Creating required matrices based on dimension of P Sk <- matrix(0,nrow=dim(P)[1],ncol=length(y)) path <-…
MM2
  • 29
  • 8
0
votes
1 answer

How to solve this with simple forward-backward algorithm?

I've been playing around with the forward-backward algorithm to find the most efficient (determined by a cost function dependent on how a current state differs from the next state) path to go from State 1 to State N. In the picture below, a short…
syamjam
  • 13
  • 2
0
votes
1 answer

Viterbi Algorithm Sequence finding

I am trying to understand Viterbi Algorithm. The states are; S1, S2, S3, BEGIN, END The values are rounded and truncated. The smoothed State transition table is as follows; S1 S2 S3 B E S1 -0.7 -1.6 -1.6 -INF -2.0 S2 -2.0 …
yns
  • 440
  • 2
  • 8
  • 28