amidst / toolbox

A Java Toolbox for Scalable Probabilistic Machine Learning
http://www.amidsttoolbox.com
Apache License 2.0
119 stars 35 forks source link

Initialization of normals in HMM model #76

Closed lonerzzz closed 7 years ago

lonerzzz commented 7 years ago

Hello,

Thanks for the work on this software. I am eager to get to know it in depth.

I am not sure if I am missing something but I cannot seem to find a way to set the initial normal values for an HMM. I am trying the following:

`

            IOHMM.initializeLearning();

            list = IOHMM.getModel().getConditionalDistributionsTimeT();

            np = (Normal_MultinomialParents)list.get( 0 );

            normalList = np.getNormalDistributions();

            Normal normal = normalList.get( 0 );

            normal.setMean( 0 );

            normal.setVariance( 32 );

`

However, in tracing the code, the extracted values are all newly created objects so their values cannot be set and then used. Is there a way to initialize these Normal values? I am trying to do so because HMMs are notoriously sensitive to local minima and I have an idea of some of the values of certain variables in certain situations.

If this is not currently possible, then please consider this an enhancement request.

andresmasegosa commented 7 years ago

Hi,

Thanks for your interest in the toolbox.

The feature you are looking for is not current available. Initial parameters are randomly initialized. The only thing you can do is to change the seed of the random initializer. I'll open a new issue with this enhancement.

https://github.com/amidst/toolbox/issues/77