If you are manually specifying the emission probabilities I don't think
there are any hooks/asserts to guarantee that variable is normalized I.E.
if you assign to the emissionprob_ instead of using the fit() function, I
think it is on you to make sure the emission probabilities you are
assigning *are* actually probabilities. From my perspective that is desired
behavior, but maybe someone with more experience on this HMM implementation
can comment.
For future reference,
Hidden Markov Models were recently split into their own project: seen here
https://github.com/hmmlearn/hmmlearn
Kyle
On Wed, May 7, 2014 at 10:41 AM, anas elghafari <anas.elghaf...@gmail.com>wrote:
> Hi scikit community,
>
> I am playing around with the Hidden Markov Mode module (multinomialHMM)
> and one thing I don't understand is why scikit accepts emission
> probabilities that add up to more or less than 1.
>
> Here is an example with two states and three emission signals:
>
> >>> import numpy
> >>> from sklearn import hmm
> >>> startprob = numpy.array([0.5, 0.5])
> >>> transition_matrix = numpy.array([[0.5, 0.5], [0.5, 0.5]])
> >>> model = hmm.MultinomialHMM(2, startprob, transition_matrix)
> >>> model.emissionprob_ = numpy.array([[0, 0, 0.2], [0.6, 0.35, 0.05]])
>
> As you can see, I am specifying the emission proabilities for state 0 as
> [0, 0, 0.2]. Scikit accepts this and generates predications with no
> complaints. Is this desired behavior? Do these probabilities get normalized?
>
> Thanks,
>
> Anas
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find
> out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general