Questions tagged [gaussian-mixture-model]

35 questions
0
votes
0 answers

Constraining log-likelihood using pymc3.Potential?

Problem description I am new to probabilistic programming and working through PyMC3's Gaussian Mixture Model sample notebook: import arviz as az import matplotlib.pyplot as plt import numpy as np import pandas as pd import pymc3 as pm import…
0
votes
0 answers

Repeatability in results of clustering very big image

I am working on clustering very big satellite images. I use PIL to open the image, K-means and Gaussian Mixture Models methods for clustering and then calculate the % of the part that has the certain color. I've noticed that I don't always get the…
0
votes
0 answers

Multivariate Gaussian Mixture Model

By using python, I want to fit Multivariate gaussian function to Multivariate Gaussian Mixture Model. What should I insert instead of places of three $ marks ? Note: There is missing for loop which will generate 3 Multivariate gaussian…
0
votes
0 answers

Gaussian Mixture Model Plot for Soft Assignment by Color

enter image description here) I want to show soft assignment by probabilities from GMM looking similar to the image posted. I want to show a data points membership between two (or more clusters). Any help would be appreciated. I tried to multiply…
0
votes
0 answers

Variational inference for Bayesian Gaussian mixture model: compatible version for fixed known number of components?

I have found examples of R code for Gaussian mixture model decomposition using variational inference with unknown number of components. In the variational inference, the iterations modify the number of components during the multiple iterations. It…
Pascalou
  • 75
  • 1
  • 9
0
votes
0 answers

EM algorithm for clustering of Gaussian Mixture models

I have a multivariate dataset(4 dimensions) of 150 points. I should use EM algorithm to group the given set of points into clusters. The number of clusters to which these points fall into is also given as 3. So, the task is to find out the Gaussians…
0
votes
0 answers

How to order an sklearn Gaussian mixture model (gmm) by mean values for image segmentation application of gmm_model.predict

I use the gmm to create a binary image from a grayscale image - effectively to segment particle regions with higher gray value than surroundings (Figure ai and bi). However, the particle region is assigned to 1 or 0 (True and Falsae for my purposes)…
0
votes
1 answer

How can one add/remove components from a sklearn gmm object for further warm start?

The sklearn.mixture object GaussianMixture provides the framework to fit a GMM to provided data, but how can one add/remove components from a sklearn gmm object for further warm start?
0
votes
0 answers

Inconsistent Clustering from Scikit Learn Gaussian Mixture Model

I used GMM from Scikit Learn package for clustering. The python code is here. import pandas as pd from numpy import unique from numpy import where from sklearn.mixture import GaussianMixture from matplotlib import pyplot #load…
0
votes
1 answer

Is there an efficient way of representing a 2D numpy array for the purpose of fitting a GMM to it?

I have been using Gaussian Mixture Models (GMM) to model a set of peaks in a 2D numpy array (a). a = np.array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 100., 1000., 100., 2., 1., 1., 1., 0., 0.,…
0
votes
0 answers

How to plot gaussian mixtures overlayed with heatmap in Python?

I have a 2D NumPy ndarray which consists of densities in a sparse matrix. I would like to plot it as a heatmap while also plotting ellipsoids derived from a couple of Gaussian mixture models fitted to my data. How can I accomplish this in…
pietro_molina
  • 97
  • 1
  • 9
0
votes
1 answer

How to get (random) number from Gaussian Mixture model(GMM)?

I want to get a list of random numbers from GMM. I've plotted a distribution like this. And I was wondering whether there is some way to get the value from the distribution curve, such as getting number 0.94, 0.96, 0.95.... How to get it? I am not…
Megan
  • 541
  • 1
  • 3
  • 14
0
votes
2 answers

Gaussian Distribution -- Unexpected distribution

I am new to the Gaussian Distribution. But a little strange here. Is there any idea what kind of occurrence could cause an odd bin between -1 and -0.5 to occur? Here is my code(But I am not sure whether it help or not) mu_0 = 0.178950369 srd_0 =…
Megan
  • 541
  • 1
  • 3
  • 14
0
votes
1 answer

using warm_start on a 1D-Gaussian Mixture Model does not seem to work - old fits gets still neglected?

Here you can see the plot of the newly fit model: the bins show all the now available data, so the initial data used to fit the model and the new data. The new data does not include the higher values. These are the model…
Stefan 44
  • 157
  • 1
  • 9
0
votes
1 answer

Why does a Gaussian Mixture Model make different clusters each run?

I'm using Python to cluster a 5D set of data. And each run generates a different set of clusters. I'm simply curious as to why this is. Here's the code: df = pd.read_csv('database.csv') ratios = df.drop(['patient', 'class'], axis=1) …