How to extract a PDF from points with a weigh attached to them

2 次查看(过去 30 天)
I Have a n by 3 matrix (lets say n = 100) where the 2 first collums are the x and y position of the point. The third collum is the weight of the particle (that got updated in a previous command). Now I would like to extract a bivariate norm pdf from these weighted points. I have found the fitgmdist command, but this does not include the weight of the points. Is there a way to do this. I have to say i'm still quite new in the matlab software Thanks

回答(1 个)

Peter Cook
Peter Cook 2017-10-18
编辑:Peter Cook 2017-10-18
I don't know if there's a canned function for this - you could try:
1. Compute weighted mean for each column of X
2. Compute covariance matrix using weighted mean (or skip #1 and compute a weighted covariance matrix directly - I am not sure if this produces the exact same result)
3. Compute eigenvalues & eigenvectors of covariance matrix
4. Use the eigenvectors corresponding to 2 largest eigenvalues to extract coefficients for the bivariate normal distribution

类别

Help CenterFile Exchange 中查找有关 Descriptive Statistics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by