A3 3.1
Author Message
c0guptab Offline
Student


Reputation: 1
Post: #1
A3 3.1
I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);
2013-03-26 16:40
Find all posts by this user Quote this message in a reply
frank Offline
Instructor


Reputation: 0
Post: #2
RE: A3 3.1
(2013-03-26 16:40)c0guptab Wrote:  I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);

It appears that your training data structure may not be organized as we would expect. Does this always happen, or just sometimes?
2013-03-26 20:56
Find all posts by this user Quote this message in a reply
c0guptab Offline
Student


Reputation: 1
Post: #3
RE: A3 3.1
(2013-03-26 20:56)frank Wrote:  
(2013-03-26 16:40)c0guptab Wrote:  I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);

It appears that your training data structure may not be organized as we would expect. Does this always happen, or just sometimes?

It works fine when type is 'kmeans'; the error occurs with 'rnd'. The format of data array seems to be correct. For a particular phoneme, this is the data array -
>ans =
Columns 1 through 5

[14x13 double] [14x14 double] [14x12 double] [14x20 double] [14x16 double]
(This post was last modified: 2013-03-26 22:35 by c0guptab.)
2013-03-26 21:14
Find all posts by this user Quote this message in a reply
frank Offline
Instructor


Reputation: 0
Post: #4
RE: A3 3.1
(2013-03-26 21:14)c0guptab Wrote:  
(2013-03-26 20:56)frank Wrote:  
(2013-03-26 16:40)c0guptab Wrote:  I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);

It appears that your training data structure may not be organized as we would expect. Does this always happen, or just sometimes?

It works fine when type is 'kmeans'; the error occurs with 'rnd'. The format of data array seems to be correct. For a particular phoneme, this is the data array -
>ans =
Columns 1 through 5

[14x13 double] [14x14 double] [14x12 double] [14x20 double] [14x16 double]

The structure seems right. What phoneme is this?

There's no explicit need to use 'rnd' rather than 'kmeans'. I'd suggest focussing on the latter for now.
2013-03-27 09:52
Find all posts by this user Quote this message in a reply
c0guptab Offline
Student


Reputation: 1
Post: #5
RE: A3 3.1
(2013-03-27 09:52)frank Wrote:  
(2013-03-26 21:14)c0guptab Wrote:  
(2013-03-26 20:56)frank Wrote:  
(2013-03-26 16:40)c0guptab Wrote:  I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);

It appears that your training data structure may not be organized as we would expect. Does this always happen, or just sometimes?

It works fine when type is 'kmeans'; the error occurs with 'rnd'. The format of data array seems to be correct. For a particular phoneme, this is the data array -
>ans =
Columns 1 through 5

[14x13 double] [14x14 double] [14x12 double] [14x20 double] [14x16 double]

The structure seems right. What phoneme is this?

There's no explicit need to use 'rnd' rather than 'kmeans'. I'd suggest focussing on the latter for now.

So, if the code works with kmeans but not rnd there won't be any marks deduction? The above example is actually not complete- just the first five columns of data array - don't recall which phoneme this is - why is that important? The error occurs with every phoneme. In fact, I simply initialized a temporary data{1} = ones(2,3) and passed it in initHMM and trainHMM and it is still giving the same error for 'rnd'.
2013-03-27 13:52
Find all posts by this user Quote this message in a reply
frank Offline
Instructor


Reputation: 0
Post: #6
RE: A3 3.1
(2013-03-27 13:52)c0guptab Wrote:  
(2013-03-27 09:52)frank Wrote:  
(2013-03-26 21:14)c0guptab Wrote:  
(2013-03-26 20:56)frank Wrote:  
(2013-03-26 16:40)c0guptab Wrote:  I get this error on executing myTrain -

Warning: mahal < 0 => C is not psd
> In gaussian_prob at 22
In gaussian_CPD.convert_to_table at 36
In gaussian_CPD.convert_to_pot at 23
In jtree_2TBN_inf_engine.fwd at 15
In smoother_engine.enter_evidence at 14
In learn_params_dbn_em>EM_step at 131
In learn_params_dbn_em at 82
In trainHMM at 36
In myTrain at 104
??? Error using ==> assert
assertion violated:

Error in ==> learn_params_dbn_em>EM_step at 132
assert(~isnan(ll))

Error in ==> learn_params_dbn_em at 82
[engine, loglik, logpost] = EM_step(engine, evidence, temperature);

Error in ==> trainHMM at 36
[HMM, LL] = learn_params_dbn_em( engine, evidence, 'max_iter', max_iter);

Error in ==> myTrain at 104
[HMM, LL] = trainHMM(HMM, phnHmm.(phnNames{p}), iter);

It appears that your training data structure may not be organized as we would expect. Does this always happen, or just sometimes?

It works fine when type is 'kmeans'; the error occurs with 'rnd'. The format of data array seems to be correct. For a particular phoneme, this is the data array -
>ans =
Columns 1 through 5

[14x13 double] [14x14 double] [14x12 double] [14x20 double] [14x16 double]

The structure seems right. What phoneme is this?

There's no explicit need to use 'rnd' rather than 'kmeans'. I'd suggest focussing on the latter for now.

So, if the code works with kmeans but not rnd there won't be any marks deduction? The above example is actually not complete- just the first five columns of data array - don't recall which phoneme this is - why is that important? The error occurs with every phoneme. In fact, I simply initialized a temporary data{1} = ones(2,3) and passed it in initHMM and trainHMM and it is still giving the same error for 'rnd'.

I was curious as to what phone this was, to see if the lengths in time of these observations made sense. The problem really seems to be the way the parameters are initialized in initHMM.m, though. Although I don't recall this happening before, I get the same assertion you do. mk_stochastic on wildly random input is not useful. This 'rnd' option should be fixed but fortunately should not affect your assignment.

Please just use kmeans and forget about 'rnd'.
2013-03-27 20:14
Find all posts by this user Quote this message in a reply
g4ortizc Offline
Student


Reputation: 0
Post: #7
RE: A3 3.1
i confirm that rnd indeed produces this weird ~nan error.
(This post was last modified: 2016-04-01 14:08 by g4ortizc.)
2016-04-01 14:08
Find all posts by this user Quote this message in a reply
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


Forum Jump:


User(s) browsing this thread: 1 Guest(s)