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
2
votes
4 answers

How to write GMM (Gaussian Mixture Model) in C?

How can I write GMM (Gaussian Mixture Model) in C. There are some implementations in Matlab but I am looking for some documentation about it and example code in C not in C++.
Yilmaz Paçariz
  • 186
  • 1
  • 4
  • 18
1
vote
1 answer

Set Axis Limits of mixfitEM plot

I want to set limits to the x-axis of the plot of the output of the mixfit function of the mixR package. This output is of class mixfitEM. Reproducable example: First I simulate a mixture of log…
FicusBenji
  • 23
  • 6
1
vote
1 answer

"Failed to set trace monitor for deviance There are no observed stochastic nodes" error when running JAGS model in R

I'm trying to get an N-mixture model to run in JAGS for a stats class that I'm currently in. However, I keep getting the error "Failed to set trace monitor for deviance There are no observed stochastic nodes" whenever I try to run the model. At the…
Josh
  • 49
  • 5
1
vote
0 answers

How to perform parallel growth mixture modeling (GMM) using R?

Usually, i'm using "lcmm" package in R - in order to perform growth mixture modeling (GMM). However, i want to create a classification or groups based on two variables rather than one. I've read that this kind of modeling called "parallel growth…
Shay
  • 11
  • 1
1
vote
0 answers

Custom Negative Loss Likelihood returning NaN's after varying numbers of training

Hello StackOverflow people, I am encountering a problem where I don't know what else I can try. First off, I am using a custom loss function (at least I believe that is the problem, but maybe it's something different?) for a mixture density…
1
vote
1 answer

pymc3: Truncated Normal mixture

I want to make a mixture of two TruncatedNormal distributions in pymc3. I am trying to modify this piece of documentation. See example #2 for Poisson. import pymc3 as pm import numpy as np x_obs = [x for x in np.random.randn(250) if 1>x>0] + [x for…
lotrus28
  • 848
  • 2
  • 10
  • 19
1
vote
0 answers

Gaussian Mixture model log-likelihood to likelihood-Sklearn

I want to calculate the likelihoods instead of log-likelihoods. I know that score gives per sample average log-likelihood and for that I need to multiply score with sample size but the log likelihoods are very large negative numbers such as…
Sahar Atif
  • 11
  • 1
1
vote
0 answers

In a mixture of Gaussions, why is the mixing coefficient greater than 0?

Also, the requirement that p(x) > 0, together with N(x|µk,Σk) > 0, implies πk > 0 for all k. I can't understand the meaning of the sentence. Why is the mixing coefficient greater than 0? Can I think that each component of a mixture always provides…
Allerias
  • 11
  • 1
1
vote
1 answer

Reproducibility of BIC results in latent class analysis via mclust package in R

I am conducting a latent class analysis in R using the mclust package. I supplied codes for BIC to select the best fitting model or optimal number of classes, but noticed that the solution is not reproducible since it gives inconsistent output any…
T Richard
  • 525
  • 2
  • 9
1
vote
0 answers

PyMC3 Dirichlet Process Multivariate Gaussian Mixture Model

I'm having trouble getting my shapes to work for a Dirichlet Process Gaussian Mixture Model. My data observations has shape (number of samples, number of dimensions). Each Gaussian's mean should be drawn from an isotropic prior, and each Gaussian's…
Rylan Schaeffer
  • 1,945
  • 2
  • 28
  • 50
1
vote
1 answer

What would be valid starting conditions to pass to fitgmdist?

I am trying to use the fitgmdist function from the statistics package in Octave. It works when I let it use the default k++ method for finding initial parameters. However, the results are not consistent and sometimes just plane wrong. That is why I…
Sander
  • 142
  • 2
  • 15
1
vote
0 answers

Model selection & Selecting the number of active components in Bayesian Gaussian Mixture Models

I have generated 2 groups of 1-D data points which are visually clearly separable and I want to use a Bayesian Gaussian Mixture Model (BGMM) to ideally recover 2 clusters. Since BGMMs maximize a lower bound on the model evidence (ELBO) and given…
nespereira
  • 67
  • 6
1
vote
1 answer

How to get Mean and Covariance value from pomegranate Gaussian Mixture model

In the scikit learn Gaussian mixture model we can get mean and covariance by clf = GaussianMixture(n_components=num_clusters, covariance_type="tied", init_params='kmeans') for i in range(clf.n_components): cov=clf.covariances_[i] …
iforcebd
  • 87
  • 11
1
vote
1 answer

Clustering: Is it a problem if factors are not independent? how to evaluate the model?

My data is as follows: each observation is a person, and the variables are time spent (in minutes) doing a given activity in the early morning, late morning, afternoon, evening, and night (5 variables). I converted the time spent to a percentage, so…
Fate
  • 75
  • 1
  • 9
1
vote
1 answer

R package smcure error Error in `[[<-.data.frame`(`*tmp*`, i, value = c(19L, 19L, 19L, 18L, 19L, : replacement has 2250 rows, data has 750

pd <- smcure(Surv(unemployment_time,censor)~Sex+Immigrant+Education_level, cureform=~Sex+Immigrant+Education_level, data=dmpold,na.action=na.omit,model="ph",Var=TRUE) Program is running..be patient...Error in…
ElianeG
  • 41
  • 3