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
0
votes
0 answers
ggplot mixture of regression lines
i'm quite new with ggplot2 package but i didn't find a solution yet to my problem. I am trying to draw the regression lines from a mixture of regression model by ggplot.
library('flexmix')
library('ggplot2')
I have a time series of quarterly GDP…

Alessandro
- 1
- 1
0
votes
0 answers
zero inflated gaussian mixture model
Are there any extensions to mclust, or another R package, which can model zero inflated continuous data?
Mclust can't handle the inflated 0s, see code below.
library(tidyverse)
library(mclust)
n <- 250
y0 <- rep(0,n)
y1 <- rnorm(n/2,4,0.5)
y2 <-…

Zeus
- 1,496
- 2
- 24
- 53
0
votes
1 answer
Mixture parameters from a TensorFlow Probability mixture density network
How do you get the mixture parameters from a mixture density network created using TensorFlow Probability?
I'm trying to learn a bit about mixture density networks and came across an example in the TensorFlow Probability documentation here. By the…

David P
- 3
- 2
0
votes
1 answer
Plotting mixtures of distributions with Julia
I want to plotting mixtures of two 1d Gaussian distributions with Julia. I am not sure what is the best way to do it. I am trying to use Distributions.jl and in specific to both
Define two Gaussians using d1 = Normal(0.0, 1.0) and d2 = Normal(1.0,…

Marion
- 271
- 3
- 11
0
votes
1 answer
Bypassing 'BLAS/LAPACK routine 'DGEBAL' gave error code -3' in CNmixt fn (ContaminatedMixt pkg)
I am using the ContaminatedMixt package, CNmixt function for clustering multidimensional data. My data dimensions range from 3 to 9. Most of the data can be clustered with no issue, but I consistently struggle to cluster the 7D data.
Apologies for…

TAH
- 120
- 1
- 3
- 11
0
votes
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
- 845
- 4
- 15
0
votes
0 answers
Why are "mixture" and "predict" giving different results in the DirichletMultinomial R package
I have been using the DirichletMultinomial R package to build some clustering of a dataset. Now, using the model I built, I would like to predict these groups on another dataset. Before doing that, I just used predict on my original dataset and I…

Aurélie
- 75
- 2
- 7
0
votes
1 answer
Error in jags.model node inconsistent with parents
I'm using a beta-binomial n-mixture model to estimate abundance. The code that I have has worked well on both simulated and natural datasets. However, when I run a particular data set this error pops up Error in jags.model(etc...) Error in node…

Rana
- 25
- 5
0
votes
1 answer
Tensorflow probability: retrieving specific random variable from joint distribution
I'm new to tensorflow probability.
I am building a hierarchical model, for which I use the JointDistributionSequential API:
jds = tfp.distributions.JointDistributionSequential(
[
# mu_g ~ uniform on sphere
tfp.distributions.VonMisesFisher(
…

Louis
- 161
- 1
- 5
0
votes
0 answers
Issues manipulating data from within a function
I have several data frames structured like this:
set.seed(123)
dat1 <- data.frame(Region = rep(c("r1","r2"), each = 100),
State = rep(c("NY","MA","FL","GA"), each = 10),
Loc =…

Ryan
- 1,048
- 7
- 14
0
votes
0 answers
How to sample from two gaussians and combine them given a probability (bernoulli)
Given two different gaussians, how can I create a mixture of the two gaussians where each datapoint is from first gaussian with probability p = 0.3 and from second with probability 0.7 (using a bernoulli distribution for the probabilites).
Here is…

user1727556
- 1
- 1
0
votes
0 answers
R JAGS unkown variable
I'm new to JAGS and bayesian estimation and trying to fit a model described by Wang & McArdle (DOI: 10.1080/10705510701758265) in JAGS via R.
Here's my code:
# generate data for reprex
m1 <- matrix(runif(20000, 0, 1), ncol=40)
colnames(m1) <-…

achmed
- 1
0
votes
0 answers
Posterior distribution
I was look for some nice features to apply with posterior probabilities. I want to make a distribution for each component, but I don't know how. As a start, how do I make a vector for each of the components in a list?
Below some information how the…

daantheboss
- 43
- 5
0
votes
1 answer
Number of components based on AIC
I am applying mixture modeling, and I have plotted the result of the AIC for different number of components. I know that the lower the better, but in this case I am doubting about what is really the best. What do you suggest and how can I best…

daantheboss
- 43
- 5
0
votes
0 answers
Shape must be rank 1 but is rank 0 for 'Tile' (op: 'Tile') with input shapes
I'm trying to calculate a simple loss function for a mixture density network.
The output's shape (batch_size=128,2) and the mu parameter's shape is (batch_size, 2* Num_mixes). To be able to calculate their difference, I need to tile the output so it…

pnaseri
- 95
- 2
- 9