Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob bob
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bobbob
  • Issues
  • #220
Closed
Open
Issue created Apr 29, 2016 by André Anjos@andre.anjos💬Owner

gmm weights changes not taken into account

Created by: DavidDoukhan

Hi list, I was willing to use class bob.learn.em.GMMMachine. I was following the following documentation, which consist to create a GMMMachine instance, and set means, covariance and weights manually: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.learn.misc/master/guide.html

I installed bob with default options using pip. According to the few logs bellow, it seems the GMM weights are not taken into account when computing the log likelihood of a sample.

import bob.learn.em
from bob.learn.em import GMMMachine
import numpy as np
print bob.learn.em.__version__

2.0.8

gmm1 = GMMMachine(1,1)
data = np.ones((1,1))
gmm1(data)

-1.4189385332046727

gmm1.weights[:] = 666
gmm1(data)

-1.4189385332046727

After few more investigation, I had the feeling that this behavior had to do with the caching of the log weights, which is not done when assigning new values to the weights, so I found a workaround consisting to create a new instance from a illed instance:

gmm2 = GMMMachine(gmm1)
gmm2(data)

5.082351137335717

This workaround seems to provide coherent results.

In conclusion, I think that this behavior should either be fixed, or set explicit within the documentation.

Regards,

Assignee
Assign to
Time tracking