简体   繁体   English

在高斯混合模型/期望最大化模型中包括时间依赖性?

[英]Including time dependency in gaussian mixture model/expectation–maximization model?

I'm working on a time series dataset and therefore while fitting the GaussianMixture() function from the scikit-learn package, I need to make each feature(timestamp) dependent. 我正在处理时间序列数据集,因此在从scikit-learn包中拟合GaussianMixture()函数时,需要使每个功能(时间戳)相关。 However, I don't find a parameter to customize the covariance matrix after examining the source code. 但是,在检查源代码之后,我找不到用于自定义协方差矩阵的参数。

With my limited statistics knowledge, I'm curious how I can modify the covariance matrix during the E-step to incorporate time dependency into GMM model. 凭借有限的统计知识,我很好奇如何在E步中修改协方差矩阵以将时间依赖性纳入GMM模型。 Thank you very much. 非常感谢你。

Here is the Source Code: The change I want to make is in the estimate_gaussian_parameters() function https://github.com/scikit-learn/scikit-learn/blob/7389dba/sklearn/mixture/gaussian_mixture.py#L435 这是源代码:我要进行的更改是在estimate_gaussian_parameters()函数中https://github.com/scikit-learn/scikit-learn/blob/7389dba/sklearn/mixture/gaussian_mixture.py#L435

With darksky 's help, I learned the function is built-in with the option of covariance-matrix. darksky的帮助下,我了解到该函数是内置的,并带有covariance-matrix选项。 The parameter covariance_type has 4 options: 'full' (each component has its own general covariance matrix), 'tied' (all components share the same general covariance matrix), 'diag' (each component has its own diagonal covariance matrix), 'spherical' (each component has its own single variance). 参数covariance_type有4个选项:“完整”(每个组件都有自己的通用协方差矩阵),“绑”(所有组件共享相同的通用协方差矩阵),“诊断”(每个组件都有自己的对角协方差矩阵),“球形”(每个分量都有其自己的单个方差)。

In my understanding then, 'spherical' is used for uni-variant dataset,'diag' is used for datasets with multi-variant but independent features. 在我的理解中,“球形”用于单变量数据集,“ diag”用于具有多变量但独立特征的数据集。 Therefore, one should either use 'full' or 'tied' if they want to predict on multi-variant and dependent features. 因此,如果要预测多变量和从属特征,则应使用“完整”或“并列”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM