DamonMIN / pmtk3

Automatically exported from code.google.com/p/pmtk3
MIT License
0 stars 0 forks source link

hmmFit should verify that model.pi0 * model.A is possible #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

  Simply try to use conversation matrix NSTATESxNSTATES and a vector as pi0 that is <> NSTATES (not 1xNSTATES). This results in an error in hmmFwdBack.*: Can't multiply pi0 * A by MATLAB.

  Happened to me using isolatedWordClassificationWithHmmsDemo and changing nstates. Because pi0 is a fixed vector it wasn't and thus leads to the error.

What is the expected output? What do you see instead?

  hmmFit should assert(pi0 * A) is possible and else report correct size needed.

What version / revision of the product are you using? On what operating
system?
pmtk3: 24 October and MATLAB 2009a

Original issue reported on code.google.com by business...@gmail.com on 3 Nov 2010 at 3:18

GoogleCodeExporter commented 8 years ago
There is a lot of user input error checking that could be done, unfortunately 
this tends to slow down and obfuscate the code. There is definitely a trade off 
here and we have opted for simplified, readable code over code that catches 
every possible error condition gracefully.  Look at the code for MATLAB 
built-in functions for a comparison. 

Original comment by mattbdun...@gmail.com on 5 Nov 2010 at 9:14