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
1
vote
3 answers

Drawing from two distributions with a probability in R

I am trying to draw from two different distributions with a probability 100000 times. Unfortunately I can't see what is wrong with my for loop, however, it only adds 1 value to simulated_data instead of the desired 100,000 values. Question 1: How…
Ollie
  • 624
  • 8
  • 27
0
votes
0 answers

Mixture using thermo library when mixture consist of solid, liquid, disolved mixture

I am experimenting with a Python library called thermo. I'm interested in obtaining the thermal properties, specifically the enthalpy, of a mixture consisting of water, sucrose, calcium carbonate, and calcium hydroxide, each in different phases. I…
MikkelB
  • 53
  • 4
0
votes
0 answers

combining cumulative and non-cumulative data dplyr

i've got time series data on supplies by irregular time intervals, which is a mixture of cumulative and non-cumulative (at irregular intervals). Does anyone know how to accurately combine/standardise the two reported data types, so that both the…
Sarah
  • 25
  • 4
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

pymc how do i add dims to gaussian mixture model

I am struggling with the below issue. Suppose I have a gaussian mixture (3 components) but I want to do have individual weights per group (two groups in the below - so i would expect w to be of shape (2,3). How do I achieve this? Tried with coords…
0
votes
0 answers

KeyError: 0 when calculate likelihood in EM algorithm

I have a model EM algorithm. The model should select random columns and then calculate the likelihood. For example, the dataset has 39 attributes, the model selects 19 attributes only and displays likelihood. define several functions…
0
votes
0 answers

data generation cluster analysis

I' don't know with what R commands you can generate datasets with combination of parameters (dimension, cluster proportions,model). I use this commands formmatrix = function(a,b,c,d,e,f,p){ m1 = c(0,8,rep(0, p-2)) m2 = c(8,0,rep(0, p-2)) …
0
votes
0 answers

I have a the following message "'collapse' argument should be a formula" while using mixture function (drc package)

While using drc package for mixture prediction on microalgae growth inhibition data, specifically the mixture function, I receive an error message "'collapse' argument should be a formula" , which I don't really understand. I'm using almost exactly…
0
votes
1 answer

How to construct mixture copula in R

I want to study mixture Copula for reliability analysis.however I can't construct RVINEMatrix , Therefore, the probability integral transformation (PIT) cannot be performed、 The copula used in H-equation to convert related variables into independent…
HIteWIng
  • 33
  • 5
0
votes
0 answers

How to show the Gaussian mixture models for clustering an image?

I used the attached code to get the GMM for some images. I also want to show the GMM on the histogram of the image. I already did that. However, I also wanna show the GMM clusters distribution. I attached the output of the GMM on the histogram and…
0
votes
1 answer

Mixture function in python thermo library

I am trying the thermo library in python and want to calculate composition of 'milk of lime' and water however when I run the code below: from thermo.chemical import Mixture mix = Mixture(['water', 'Ca(OH)2'], Vfls=[.6, .4], T=300,…
MikkelB
  • 53
  • 4
0
votes
1 answer

Importance Sampling To Create Gaussian Mixture Model in R

How do I implement the following: Create a Gaussian mixture model sampler. In this sampler, a datum has a 40% chance of being sampled from a N(-1,1) distribution, and a 60% chance of being sampled from a N(2,1/9) distribution. Sample 100,000 data…
0
votes
1 answer

A mixture of beta distribution in R

I was given a function (a mixture of beta distribution): f(x) = beta(1,6)/3 + beta(3,6)/3 + beta(10,6)/3 My task is to plot the density of f(x). Here is my code: par(mfrow=c(1,1)) x <- seq(0,1,0.001) plot(x,dbeta(x, shape1 = 1, shape2 = 6)/3 +…
0
votes
1 answer

Is it possible to do Dynamic Call to ggplot stat_function?

This is some snippets of How to draw a ggplot curve over a mixture gaussian model ggplot(mix_example) + geom_histogram(aes(x = x, y = ..density..)) + stat_function(geom = "line", fun = fun_prop, color="red", args = list(mean =…
Jovan
  • 763
  • 7
  • 26
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