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.

56 questions
9
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
6
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
  • 355
  • 4
  • 12
6
votes
4 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
  • 3,075
  • 2
  • 18
  • 29
5
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
  • 445
  • 5
  • 12
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
  • 693
  • 10
  • 23
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
2
votes
1 answer

Why `x` is now the mixture of these five gamma distributions from the following R code?

I try to sample from the following mixture models of gamma distribution: enter image description here The R code is as follows: The algorithm can be translated into a vectorized approach. Step 1: Generate a random sample k_1,...,k_n of integers in…
oliver
  • 157
  • 9
2
votes
0 answers

Monte Carlo simulations for VAR models

I've been trying to estimate VAR models using Monte Carlo Simulation. I have 3 endogenous variables. I need some guidance regarding this. First of all, I want to add an outlier as a percentage of the sample size. Second (second simulation for same…
Ozge
  • 31
  • 1
2
votes
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
  • 21
  • 1
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
0 answers

Flexmix R: Mixture regression with distinct component variables

I was setting up the following exemplarely mixture of regression model using the flexmix package in R: model = flexmix(y~ x1 + x2 +x3, data = Data, k=2, control = list(verb = 5, iter = 1000)) How can I decide to drop one variable in one of the…
Rzero
  • 21
  • 1
2
votes
1 answer

Fitting a mixture of gamma and normal distribution to data in R

I would like to fit a mixture of gamma and normal distribution to my data in R. The data: dput(A) 0.0838, 0.081, 0.0816, 0.0838, 0.0824, 0.0871, 0.0899, 0.0938, 0.099, 0.1018, 0.0998, 0.1, 0.0955, 0.0972 Based on the data I believe (by looking at…
Is_PhD
  • 21
  • 2
2
votes
2 answers

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,210
  • 6
  • 23
  • 43
1
2 3 4