[mlpack-git] [mlpack] hmm_train failed to converge (#496)

davudadiguezel notifications at github.com
Tue Dec 15 11:22:50 EST 2015


Hi,
I have trouble running on some of my files I get this error message:

---------------------

INFO ] EMFit::Estimate(): iteration 251, log-likelihood -163419
[INFO ] EMFit::Estimate(): iteration 252, log-likelihood -163419
[INFO ] GMM::Estimate(): log-likelihood of trained GMM is -163419
[INFO ] Cluster 6 is empty
[DEBUG] Point 0 assigned to empty cluster 6
[INFO ] Cluster 7 is empty
[DEBUG] Point 1 assigned to empty cluster 7
[INFO ] KMeans::Cluster(): iteration 1, residual inf
[INFO ] Cluster 7 is empty
[DEBUG] Point 32 assigned to empty cluster 7
[INFO ] KMeans::Cluster(): iteration 2, residual inf
[INFO ] KMeans::Cluster(): iteration 3, residual 0269213
[INFO ] KMeans::Cluster(): iteration 4, residual 0
[INFO ] KMeans::Cluster(): converged after 4 iterations
[INFO ] 2240 distance calculations
[DEBUG] Covariance matrix is not positive definite  Adding perturbation
[DEBUG] Covariance matrix is not positive definite  Adding perturbation

error: chol(): failed to converge

terminate called after throwing an instance of 'std::runtime_error'
  what():  chol(): failed to converge

Program received signal SIGABRT, Aborted
0x00007ffff64e4cc9 in __GI_raise (sig=sig at entry=6) at /nptl/sysdeps/unix/sysv/linux/raisec:56
56      /nptl/sysdeps/unix/sysv/linux/raisec: No such file or directory
(gdb) bt
#0  0x00007ffff64e4cc9 in __GI_raise (sig=sig at entry=6) at /nptl/sysdeps/unix/sysv/linux/raisec:56
#1  0x00007ffff64e80d8 in __GI_abort () at abortc:89
#2  0x00007ffff6def535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++so6
#3  0x00007ffff6ded6d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++so6
#4  0x00007ffff6ded703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++so6
#5  0x00007ffff6ded922 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++so6
#6  0x00007ffff799e144 in arma::arma_bad<char [27]> (x=, hurl=true) at /usr/include/armadillo_bits/debughpp:177
#7  0x00007ffff79a9387 in arma::op_chol::apply<arma::Mat<double> > (out=, X=) at /usr/include/armadillo_bits/op_chol_meathpp:26
#8  0x00007ffff79a6809 in arma::Mat<double>::Mat<arma::Mat<double>, arma::op_chol> (this=0x7fffffffb300, X=) at /usr/include/armadillo_bits/Mat_meathpp:3932
#9  0x00007ffff79a59ad in arma::Proxy<arma::Op<arma::Mat<double>, arma::op_chol> >::Proxy (this=0x7fffffffb300, A=) at /usr/include/armadillo_bits/Proxyhpp:309
#10 0x00007ffff79a2ba3 in arma::op_strans::apply_proxy<arma::Op<arma::Mat<double>, arma::op_chol> > (out=, X=) at /usr/include/armadillo_bits/op_strans_meathpp:220
#11 0x00007ffff799f88e in arma::op_htrans::apply<arma::Op<arma::Mat<double>, arma::op_chol> > (out=, in=, junk=0x0) at /usr/include/armadillo_bits/op_htrans_meathpp:265
#12 0x00007ffff799e9e2 in arma::Mat<double>::operator=<arma::Op<arma::Mat<double>, arma::op_chol>, arma::op_htrans> (this=0x8fbc00, X=) at /usr/include/armadillo_bits/Mat_meathpp:3948
#13 0x00007ffff799b7ab in mlpack::distribution::GaussianDistribution::FactorCovariance (this=0x8fbac0) at /org/share/home/adigueze/mlpack-master/src/mlpack/core/dists/gaussian_distributioncpp:38
#14 0x00007ffff799b732 in mlpack::distribution::GaussianDistribution::Covariance(arma::Mat<double>&&) (this=0x8fbac0, covariance=<unknown type in /org/share/home/adigueze/mlpack-master/bin/lib/libmlpackso1, CU 0x21ab0, DIE 0x52374>)
    at /org/share/home/adigueze/mlpack-master/src/mlpack/core/dists/gaussian_distributioncpp:30
#15 0x00000000005fe597 in mlpack::gmm::EMFit<mlpack::kmeans::KMeans<mlpack::metric::LMetric<2, true>, mlpack::kmeans::RandomPartition, mlpack::kmeans::MaxVarianceNewCluster, mlpack::kmeans::NaiveKMeans, arma::Mat<double> >, mlpack::gmm::PositiveDefiniteConstraint>::InitialClustering (this=0x8fc280, observations=, dists=, weights=) at /org/share/home/adigueze/mlpack-master/src/mlpack//mlpack/methods/gmm/em_fit_implhpp:264
#16 0x00000000005f4472 in mlpack::gmm::EMFit<mlpack::kmeans::KMeans<mlpack::metric::LMetric<2, true>, mlpack::kmeans::RandomPartition, mlpack::kmeans::MaxVarianceNewCluster, mlpack::kmeans::NaiveKMeans, arma::Mat<double> >, mlpack::gmm::PositiveDefiniteConstraint>::Estimate (this=0x8fc280, observations=, dists=, weights=, useInitialModel=false) at /org/share/home/adigueze/mlpack-master/src/mlpack//mlpack/methods/gmm/em_fit_implhpp:39
#17 0x00000000005e9027 in mlpack::gmm::GMM<mlpack::gmm::EMFit<mlpack::kmeans::KMeans<mlpack::metric::LMetric<2, true>, mlpack::kmeans::RandomPartition, mlpack::kmeans::MaxVarianceNewCluster, mlpack::kmeans::NaiveKMeans, arma::Mat<double> >, mlpack::gmm::PositiveDefiniteConstraint> >::Estimate (this=0x8f68a0, observations=, trials=1, useExistingModel=false) at /org/share/home/adigueze/mlpack-master/src/mlpack//mlpack/methods/gmm/gmm_implhpp:190
#18 0x00000000005dd382 in mlpack::hmm::HMM<mlpack::gmm::GMM<mlpack::gmm::EMFit<mlpack::kmeans::KMeans<mlpack::metric::LMetric<2, true>, mlpack::kmeans::RandomPartition, mlpack::kmeans::MaxVarianceNewCluster, mlpack::kmeans::NaiveKMeans, arma::Mat<double> >, mlpack::gmm::PositiveDefiniteConstraint> > >::Train (this=0x7fffffffd770, dataSeq=, stateSeq=) at /org/share/home/adigueze/mlpack-master/src/mlpack/methods/hmm/hmm_implhpp:276
#19 0x00000000005d1543 in Train::Apply<mlpack::hmm::HMM<mlpack::gmm::GMM<mlpack::gmm::EMFit<mlpack::kmeans::KMeans<mlpack::metric::LMetric<2, true>, mlpack::kmeans::RandomPartition, mlpack::kmeans::MaxVarianceNewCluster, mlpack::kmeans::NaiveKMeans, arma::Mat<double> >, mlpack::gmm::PositiveDefiniteConstraint> > > > (hmm=, trainSeqPtr=0x7fffffffd400) at /org/share/home/adigueze/mlpack-master/src/mlpack/methods/hmm/hmm_train_maincpp:170
#20 0x00000000005c3415 in main (argc=14, argv=0x7fffffffe128) at /org/share/home/adigueze/mlpack-master/src/mlpack/methods/hmm/hmm_train_maincpp:344


----------------------

Here is the input file and the labels I use:


[obsShoulderLeftcsvtxt](https://githubcom/mlpack/mlpack/files/62846/obsShoulderLeftcsvtxt)
[labelscsvtxt](https://githubcom/mlpack/mlpack/files/62847/labelscsvtxt)

I run hmm_train like this:
hmm_train  -v -i labelscsv -o runNormalizedTestxml -t gmm -g 10 -n 13

I guess, the error means that the EM algorithm does not converge I normalized my data, but this didn't change anything Is there anything else I can do? Or is there anything wrong with my data? On other files everything works fine Any help is very welcome
Greetings
davud



---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/496
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151215/b18ff7c7/attachment-0001.html>


More information about the mlpack-git mailing list