Questions tagged [mixture]

In statistics a mixture distribution has samples drawn from multiple distributions differing in either their forms or the parameters,

Simulated distributions can be modeled as IID draws from a single distribution or they can be formed from random draws from more than one such distribution. The simplest form would be c*Norm(0,1) + (1-c)*Norm(0,2) when c is a number in the (0,1) interval.

44 questions
8
votes
1 answer

Simulate mixture data with different mix dependecies structure between each two variables?

I would like to simulate a mixture data, say 3 dimensional data. I would like to have 2 different components between each two variables. That is, simulate mixture data (V1 and V2) where the dependencies between them is two different normal…
user7905871
5
votes
1 answer

Using Gaussian Mixture for 1D array in python sklearn

I would like to use a Gaussian mixture model to return something like the image below except proper Gaussians. I'm attempting to use python sklearn.mixture.GaussianMixture but I have failed. I can treat each peak as though it were the height of a…
user40551
  • 315
  • 4
  • 9
5
votes
3 answers

GaussianMixture initialization using component parameters - sklearn

I want to use sklearn.mixture.GaussianMixture to store a gaussian mixture model so that I can later use it to generate samples or a value at a sample point using score_samples method. Here is an example where the components have the following…
hashmuke
  • 2,285
  • 2
  • 15
  • 27
4
votes
2 answers

Can I fix the mean of one component of a Gaussian Mixture Model in python before fitting?

I am interested in fitting a 2-component Gaussian Mixture Model to the data shown below. However, since what I am plotting here are log-transformed counts normalized to be between 0-1, the maximum value my data will ever take is 0. When I try a…
Benjamin Doughty
  • 355
  • 3
  • 11
4
votes
1 answer

Plot normalized uniform mixture

I need to reproduce the normalized density p(x) below, but the code given does not generate a normalized PDF. clc, clear % Create three distribution objects with different parameters pd1 = makedist('Uniform','lower',2,'upper',6); pd2 =…
4
votes
0 answers

Mixture of poisson distribution using flexmix in R

I am trying to fit mixture of 3 poisson distribution using flexmix package in R as per the code below: require(flexmix) freq<- c(222950,111682,72429,48126,34515,25801,19199,15033,11859, 9226, 7363, 5910, 4659, 3723, 2985, 2291,1907, 1447,…
4
votes
1 answer

Initialize Parameters Gaussian Mixture in Python with sklearn

I'm trying really hard to do a Gaussian Mixture with sklearn but I think I'm missing something because it definitively doesn't work. My original datas look like this: Genotype LogRatio Strength AB 0.392805 10.625016 AA 1.922468 …
Elysire
  • 603
  • 7
  • 19
2
votes
0 answers

Incompatible shape issue with a mixture density network in tensorflow/keras

I'm stuck on a problem while computing a mixture density network through keras (using tensorflow backends). The goal of this MDN is to learn a latent representation of an image (in order to implement the predictions of the MDN in an autoencoder).…
2
votes
1 answer

Outlier detection using Gaussian mixture

I have 5000 data points for each of my 17 features in a numpy array resulting in a 5000 x 17 array. I am trying to find the outliers for each feature using Gaussian mixture and I am rather confused on the following: 1)how many components should I…
azal
  • 1,055
  • 2
  • 17
  • 35
2
votes
1 answer

Plot Gaussian Mixture in R using ggplot2

I'm approximating a distribution with gaussian mixtures and was wondering whether there was an easy way to automatically plot the estimated kernel density of the whole (uni-dimensional) dataset as the sum of the component densities in a nice fashion…
Mr. Z
  • 1,321
  • 9
  • 24
1
vote
1 answer

Estimating parameters of a mixture distribution of 2 normals given quantile values

I have a mixture distribution of two normals with known weights 0.6 and 0.4. I know the true values of the parameters -in this case the first is a normal with mean = 10030, sd = 2 and the second is normal with mean 10000 and sd = 1- but I want to be…
spencergw
  • 11
  • 2
1
vote
0 answers

Constraining parameters with an inequality astropy mixture modelling

I am trying to do a mixture of two Gaussians but I do not know how to make it that the parameters of one Gaussian are greater than the parameters of the other. # Generate fake data np.random.seed(42) g1 = models.Gaussian1D(0.7, -0.5, 0.2) g2 =…
1
vote
1 answer

Normal Mixture Distribution

I am trying to create a qqplot and run a KS test for a normal mixture distribution with 25% N(μ=0,σ=4) and 75% N(μ=4,σ=2). How could I adapt my qqplot and KS test for this distribution? I don't think my abline is correct and my KS test doesn't…
John Huang
  • 197
  • 8
1
vote
0 answers

Getting Value Error from CoolProp mixture

I'm new with CoolProp and I'm trying to get values(density, entalpy ect) from mixture of gases. When I use this code it is working fine: i_2 = PropsSI('H', 'T', 340, 'P', 101325, 'HEOS::O2[0.07]&CO2[0.12]&Ar[0.006]&Water[0.1]&N2[0.7]') i_2 =…
DajaSvecu
  • 11
  • 1
1
vote
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 me the observations drown from each component. Here is an…
Maryam
  • 741
  • 4
  • 19
1
2 3