Questions tagged [mixture-model]

In statistics, a mixture model is a probabilistic model that is formed by a combination of probabilistic models. For example, the Gaussian mixture model is the weighted sum of Gaussian distributions. Mixture models are mainly used in probabilistic clustering of data and modelling of unknown distributional shapes.

222 questions
1
vote
2 answers

Mixture of multivariate gaussian distribution tensorflow probability

As said in the title, I am trying to create a mixture of multivariate normal distributions using tensorflow probability package. In my original project, am feeding the weights of the categorical, the loc and the variance from the output of a neural…
1
vote
1 answer

PyTorch: Is retain_graph=True necessary in alternating optimization?

I'm trying to optimize two models in an alternating fashion using PyTorch. The first is a neural network that is changing the representation of my data (ie a map f(x) on my input data x, parameterized by some weights W). The second is a Gaussian…
1
vote
0 answers

Cannot run GMMHMM (Hidden Markov Model with Gaussain Mixture emissions in hmmlearn) with high number of mixtures

I'm trying to use Gaussian Mixture Model within the hmmlearn package using the following configuration for a time series with 49792 samples: model = GMMHMM(n_components=40, n_mix = 5, tol = 1e-6, covariance_type = "full", n_iter=100,…
1
vote
0 answers

Getting in-component posterior probabilities in GaussianMixture

I used GaussianMixture in Scikit-learn to estimate 3 components. The result is shown in the picture bellow. Now, consider the "Point A". I need to find the probability of this point in each of the estimated Gaussian distributions. I used the…
user2079550
  • 537
  • 1
  • 4
  • 10
1
vote
2 answers

Sampling data points from a Gaussian Mixture Model python

I am really new to python and GMM. I learned GMM recently and trying to implement the codes from here I met some problems when I run gmm.sample() method: gmm16 = GaussianMixture(n_components=16, covariance_type='full', random_state=0) Xnew =…
wow_fan
  • 111
  • 1
  • 10
1
vote
2 answers

Latent Class Analysis in R using a mix model

I am trying to perform a latent class analysis in R but I have some variables that are both continuous and categorical. In addition I have 52 states or rows and I am trying to have 52 latent class or subgroups. I started to write the code in R but I…
G.Aurelien
  • 55
  • 9
1
vote
0 answers

ggplot2 geom_histogram draw desity bars from sampling a mixture distribution with 2 weighted distribution

First things first, I got the 2 mixed distributions (they have mixed part) and I've known the samples come from which distribution. Then I want to plot histogram according to the samples' density and the mixture distribution. Let's head to the code…
1
vote
1 answer

Use scipy.optimize.least_squares to fit Gaussian Mixture Model to spectral data

I'm trying to fit the sum of 3 Gaussians to experimental data using scipy.minimize function. I need your help in properly passing the objective function since that is where error seems to be pointing to. Obviously, I'm new to Python. The…
Dusan Kojic
  • 339
  • 4
  • 11
1
vote
1 answer

How to improve fit of Poisson Mixture Model in PyMC3?

I have some data that looks like this: I want to try to model this data using a Poisson Mixture Model with 2 components. As I am new to PyMC3, I used the links here: PyMC3 GMM tutorial and here: PyMC3 Mixture API to try to do this. My code is here:…
ilikecats
  • 199
  • 1
  • 3
  • 17
1
vote
0 answers

How to set up bayesian linear regression with mixture modelling in rjags?

I'm trying to make a bayesian mixture model using rjags. This is an attempt to map a dose-response relationship for experiments conducted in 19 labs. As such, the model that I produced has intercepts for all the labs. I want to cluster the lab…
Altamash Rafiq
  • 349
  • 1
  • 2
  • 10
1
vote
1 answer

Is the GMMHMM in hmmlearn running without bugs for any n_samples size?

First of all my hmmlearn version is 0.3.0b (installed using conda). I am trying to implement a GMMHMM model in hmmlearn but I am getting: ValueError: n_samples=3 should be >= n_clusters=5 To become more specific I have a model of 4 states and 5…
mrt
  • 339
  • 1
  • 2
  • 14
1
vote
0 answers

Fitting Gaussians using a Gaussian mixture model

I have this data I plot the histogram using matplotlib: n, bins, _= plt.hist(data, bins = 1000) plt.show() The result is: One can notice three even four Gaussian distirbution. In order to fit Gaussian distirbution to the histogram, I followed this…
DimKoim
  • 1,024
  • 6
  • 20
  • 33
1
vote
0 answers

STAN - getting different results when using sampling statement vs directly incrementing the log probability

I'm attempting to implement a model in stan by directly incrementing the log probability using the 'target += bernoulli_logit_lmpf(y|alpha)' functionality. The full model is below: data { int Ntotal; int y[Ntotal]; int
Tim
  • 69
  • 6
1
vote
0 answers

How to model data from two different parametric families with censoring in JAGS

I have found a nice post to do this without censoring, How to model a mixture of finite components from different parametric families with JAGS? but I'm working on a model with censoring. This code generates a mixture of a Weibull, and a "point…
1
vote
2 answers

Mixture Models in Stan - vectorization

I'm learning Stan now and wanted to implement a simple mixture model. In the reference manual (stan-reference-2.14.0) there is a solution already: data { int K; // number of mixture components int N; // number of data points …
Drey
  • 3,314
  • 2
  • 21
  • 26