Decompose a sum of Gaussian curves

591 Views Asked by At

I have a data set with 2 different curves in a .csv file. Both curves are a sum of Gaussian curves and I'd like to be able to decompose these curves into their substituent addends:

curve1,curve2,x
274519,242446,0
250313,220161,1
233884,207918,2
223944,198910,3
213773,187065,4
198681,171146,5
186277,159196,6
179781,148868,7
182833,145484,8
186396,141645,9
200179,137819,10
236558,149245,11
306208,183817,12
389970,240836,13
459648,300125,14
504525,341445,15
523880,364225,16
525028,376706,17
506352,376812,18
466522,365068,19
439922,355739,20
412069,338576,21
357553,305250,22
309008,272683,23

Is there any library providing tools to quickly do this?

Many thanks

1

There are 1 best solutions below

0
On

This is basically a Gaussian Mixture model problem (GMM) - you can use the Expectation Maximization (EM) algorithm (great example with the Yosemite data on Wikipedia https://en.wikipedia.org/wiki/Expectation%E2%80%93maximization_algorithm). With EM you iteratively build up a hidden state that says each data point belongs to either one distribution or the other.