Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
bob
bob
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • bob
  • bobbob
  • Issues
  • #220

Closed
Open
Opened Apr 29, 2016 by André Anjos@andre.anjos💬
  • Report abuse
  • New issue
Report abuse New issue

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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: bob/bob#220