python Fitting weighted data with Gaussian mixture model (GMM) with minimum on covariance

ساخت وبلاگ

Vote count: 0

I want to fit a Gaussian mixture model to a set of weighted data points using python.

I tried sklea.mixture.GMM() which works fine except for the fact that it weights all data points equally. Does anyone know a way to assign weights to the data points in this method? I tried using data points several times to "increase their weight", but this seems ineffective for large datasets.

I also thought about implementing the EM algorithm myself, but this seems to be much slower than e.g. the GMM method above and would extremely increase the computation time for large datasets.

I just discovered the opencv method for the EM algorithm cv2.EM(). This again works fine but has the same problem as sklea.mixture.GMM and additionally, there seems no way to change the minimum of the values allowed for the covariance. Or is there a way to change the covariance minimum to e.g. 0.001? I hoped that it would be possible to use the probe parameter to assign the weights to the data, but this seems to be just an output parameter and has no influence on the fitting process, doesn't it? Using probs0 and start the algorithm with the M step by using trainM didn't help either. For probs0 I used a (number of datapoint) x (number of GMM components) matrix whose columns are identical while the weighting parameters for the data points are written to the row corresponding to the data point. This didn't solve the problem either. It just resulted in a mixture model where all means where 0.

Has anyone an idea how to manipulate the methods above or does anyone know another method so that the GMM can be fitted with weighted data?

Thanks, Jane

asked 1 min ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 219 تاريخ : سه شنبه 17 فروردين 1395 ساعت: 17:39