Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

GMM explainations #8

@josiahls

Description

@josiahls

Sorry if this is a little open ended. I am making a pytorch dads implementation and have never worked with GMMs before. I am curious about the behavior I should expect from a GMM. Currently I have a toy problem just to show what kind of data I'm playing with:

hot_air_ballon_start_states=torch.rand((5,1))
hot_air_ballon_start_actions=torch.rand((5,1))-0.5
hot_air_ballon_next_states=hot_air_ballon_start_states+hot_air_ballon_start_actions

next_timesteps=hot_air_ballon_next_states-hot_air_ballon_start_states    
x=torch.hstack([hot_air_ballon_start_states,hot_air_ballon_start_actions])
dist=gmm(x)

Full example and code: here
Note: I do plan to use batch norm and feed in a fully connected layer into the GMM like in the DADS implementation but I trying to get an mvp right now.

From my understanding, the GMM can:

  • Be used to predict what the next state will literally look like.
  • Used to predict the current probability of the next state given the input.
    So basically, GMMs can do double-duty of generating and evaluating data which is cool.

Some questions:

  • Can GMMs overfit? For debugging purposes I am wondering whether I should expect my GMM to be exact or whether I can only hope that it gets somewhere close. For example below:
    image

  • Is there any guide on how many components I should use for a GMM? At what point should the number of components increase? Is this mostly trial and error?

  • When should you fix_variance?

  • Is use_modal_mean only possible when the number of components > 1?

    • Does a GMM perform worse if components > 1 and use_modal_mean==False?
  • How do GMMs scale? If I flatten an image, does this become intractable?

Also let me know if there is a better forum to ask you all about this :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions