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.
Questions tagged [mixture-model]
222 questions
4
votes
1 answer
Finite mixture of tweedie
I'm trying to estimate a finite mixture of tweedie (or compound Poisson-gamma) distributions. I have scoured any resources I can think of, without finding any resources on how to do this.
I am currently trying to use the flexmix package in R writing…

masher
- 41
- 2
4
votes
1 answer
lognormal mixture in python
I'm trying to fit a mixture of 3 normal distributions to my log of transformed data and I'm a bit confused how to do it. I tried gmm function from scikit learn python but it does not seem to work correctly.
g =…

user27241
- 201
- 3
- 10
4
votes
2 answers
Fitting 3 Normals using PyMC: wrong convergence on simple data
I wrote a PyMC model for fitting 3 Normals to data using (similar to the one in this question).
import numpy as np
import pymc as mc
import matplotlib.pyplot as plt
n = 3
ndata = 500
# simulated data
v = np.random.randint( 0, n, ndata)
data =…

Michael Schubert
- 2,726
- 4
- 27
- 49
3
votes
0 answers
How to store the observation of each mixture component in R
I would like to fit a mixture model in R, manually. Then, I would like to store the observation for each component of the mixture model separately. That is, I would like my code to retain the observations drawn from each component. Here is an…
user9798936
3
votes
1 answer
Difference between GMM and HMM
From what I understand:
GMM is a probabilistic model which can model N sub population normally distributed. Each component in GMM is a Gaussian
distribution.
HMM is a statistical Markov model with hidden states. When the data is continuous, each…

lmelaam
- 107
- 1
- 6
3
votes
1 answer
Keras Model using Tensorflow Distribution for loss fails with batch size > 1
I'm trying to use a distribution from tensorflow_probability to define a custom loss function in Keras. More specifically, I'm trying to build a Mixture Density Network.
My model works on a toy dataset when batch_size = 1 (it learns to predict the…

Dan
- 651
- 2
- 8
- 19
3
votes
1 answer
scikitlearn- How can I get cdf of a gaussian mixture model?
Right now I do something like this, and im wonedring if there are better ways.
import numpy as np
from scipy import integrate
from sklearn.mixture import GaussianMixture as GMM
model = GMM(n, covariance_type = "full").fit(X)
def cdf(x):
return…

h3h325
- 751
- 1
- 9
- 19
3
votes
1 answer
PyMC3 Multivariate Mixture Model: Constraining components to be non-empty
I am implementing a Personalized Mixture of Multivariate Gaussian Regressions in pymc3 and running into an issue with empty components. After referring to the related PyMC3 mixture model example, I tried implementing the model using univariate…

Mack
- 2,614
- 2
- 21
- 33
3
votes
1 answer
Unreasonable [positive] log-likelihood values from matlab "fitgmdist" function
I want to fit a data sets with Gaussian mixture model, the data sets contains about 120k samples and each sample has about 130 dimensions. When I use matlab to do it, so I run scripts (with cluster number 1000):
gm = fitgmdist(data, 1000, 'Options',…

徐珍琦
- 71
- 5
3
votes
2 answers
predicting from flexmix object (R)
I fit some data to a mixture distribution of two gaussian in flexmix:
data("NPreg", package = "flexmix")
mod <- flexmix(yn ~ x, data = NPreg, k = 2,
model = list(FLXMRglm(yn ~ x, family= "gaussian"),
FLXMRglm(yn ~…

spore234
- 3,550
- 6
- 50
- 76
3
votes
1 answer
python - curve_fit is seemingly unable to fit sum of gaussians
Here I have defined a function to return the sum of an arbitrary number of Gaussian Distributions:
import numpy
from numpy import *
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
def GaussSum(x,*p):
n=len(p)/3
A=p[:n]
…

brad.t
- 33
- 3
3
votes
1 answer
R: Calculating the probability density function of a special definition of Skew-T Distribution
I currently work with the mixture model package EMMIXskew and I have fitted a skew-t Distribution on my data (some numerical vector).
The package has some density function ddmst but I haven't seen a probability density function in this package and I…

Novice
- 307
- 2
- 11
3
votes
0 answers
Mixture of Gaussian and Uniform in R
I am trying to fit a mixture of a gaussian and a uniform distribution
in R with only limited success.
I rely on flexmix to provide an EM framework and I fit the
components using slightly adapted versions of the matching moment
estimators from…

Andreas
- 1,106
- 9
- 26
3
votes
4 answers
Sklearn-GMM on large datasets
I have a large data-set (I can't fit entire data on memory). I want to fit a GMM on this data set.
Can I use GMM.fit() (sklearn.mixture.GMM) repeatedly on mini batch of data ??

abilng
- 195
- 2
- 10
3
votes
1 answer
Labelling new data using trained Gaussian Mixture Model
I am not sure how to do the prediction for some new data using trained Gaussian Mixture Model (GMM). For example, I have got some labelled data drawn from 3 different classes (clusters). For each class of data points, I fit a GMM (gm1, gm2 and gm3).…

Samo Jerom
- 2,361
- 7
- 32
- 38