No problem, this can happen, but please make sure, before opening a new thread, that at least the part of your code that produces the input data is really correct. This way, we can try to work on your Viterbi algorithm itself with good data. For the time being, the Dumper output shows for example some inner arrays with only 0 values, I am not completely sure that's really what you want to start with. Don't hesitate to use the Dumper function of the Data::Dumper module (the way I did it) to better visualize your data and be sure that it is what you wish us to work on. Also note that the two zero-cost code segments were bugged and could not compile; I fixed them so that they would at least compile and do something, but I am not completely sure that what they do now is really what you wanted them to do. Well, in brief, please provide really good input data, then, once we have that, I am sure that some gentle monks among us will be willing to go through the Viterbi algorithm with you. (If you have trouble producing really good input data, I would suggest that you ask for help here, and create a new thread only once this part of the work is completely solved.)

In reply to Re^3: Viterbi application by Laurent_R
in thread Viterbi application by azheid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.