尝试采用GMM进行聚类研究,在执行过程中出现问题,

经查询,mathworks官方支持论坛有很好的解决建议。特此记录一下:

原文网址:

I am trying to generate the Gaussian mixture parameter estimates from a dataset using the GMDISTRIBUTION.FIT function in Statistics Toolbox 7.1 (R2009a)by executing the following line of code.

obj = gmdistribution.fit(testdata,2);

Here, 'testdata' is the dataset that I load from a MAT file.

However, after executing the above line of code, I receive the following error message.

??? Error using ==> gmcluster at 181

Ill-conditioned covariance created at iteration 53.

Error in ==> gmdistribution.fit at 199

[S,NlogL,optimInfo] =...

Error in ==> test_stats at 2

obj = gmdistribution.fit(testdata,2);

My intention is to fit a 2 component Gaussian mixture model to this dataset.

官网回答解决方案:

This error message is expected because the GMDISTRIBUTION.FIT function is not able to fit a 2 component Gaussian mixture model to the dataset in Statistics Toolbox 7.1 (R2009a).

As a general guideline to Gaussian Mixture Model(GMM) fitting, the GMDISTRIBUTION function may converge to a solution where one or more of the components has an ill-conditioned or singular covariance matrix.

The following issues may result in an ill-conditioned covariance matrix:

1. The number of dimensions of your data is relatively high and there are not enough observations.

2. Some of the features (variables) of your data are highly correlated.

3. Some or all the features are discrete.

4. You tried to fit the data to too many components.

In general, you can avoid getting ill-conditioned covariance matrices by using one of the following precautions:

1.Pre-process your data to remove correlated features. 如果是属性有相关性导致,可以进行预处理

2.Set 'SharedCov' to true to use an equal covariance matrix for every component. 将参数设为true

3.Set 'CovType' to 'diagonal'.

4.Use 'Regularize' to add a very small positive number to the diagonal of every covariance matrix.  采用Regularize参数添加一个小的非零数值。

5.Try another set of initial values.

matlab ill,Matlab跑GMM聚类时出现Ill-conditioned covariance created at iteration xx错误提示相关推荐

  1. GMM聚类及Matlab代码实现

    算法特点 GMM GMM聚类与Keams聚类很相似.K-means是将每个数据点分配到某一个类别中,而GMM则是给出这些数据点被分配到每个类别的概率,又叫做soft assignment.其除了被用在 ...

  2. 聚类分析 | MATLAB实现k-Means(k均值聚类)分析

    目录 聚类分析 | MATLAB实现k-Means(k均值聚类)分析 k-均值聚类简介 相关描述 程序设计 学习小结 参考资料 致谢 聚类分析 | MATLAB实现k-Means(k均值聚类)分析 k ...

  3. 2021-05-10 Matlab短时傅里叶变换和小波变换的时频分析

    Matlab短时傅里叶变换和小波变换的时频分析 简介 本文主要给定一小段音频,通过短时傅里叶变换和小波变换制作时频图.音频的采样率为44100, 短时傅里叶变换 在matlab中,短时傅里叶变换的分析 ...

  4. quantrader和matlab不匹配,【Matlab量化投资】支持向量机择时策略

    原标题:[Matlab量化投资]支持向量机择时策略 感谢国泰安与本公众号合作 推出[Matlab量化投资系列] 机器学习 所谓机器学习,其实就是根据样本数据寻找规律,然后再利用这些规律来预测未来的数据 ...

  5. matlab画中国近海有效波高时遇到的问题及m_map的用法注意事项

    matlab画中国近海有效波高时遇到的问题及m_map的用法注意事项 数据问题 这个数据很不友好,它的纬度从大到小,经度又从小到大. 这需要笔者转置数据. 先定位数据在矩阵的位置.最高的纬度是50°N ...

  6. MATLAB去读网页源码时中文乱码

    MATLAB去读网页源码时中文乱码 防止获取的网页源码中文乱码 %设置网页的编码方式(必须首先知道网页的编码方式) options = weboptions('CharacterEncoding',' ...

  7. 变压器空载合闸matlab,基于MATLAB的变压器空载合闸时励磁涌流仿真分析

    · 电气与自动化 · 李兴宁,等 ·基于 MATLAB的变压器空载合闸时励磁涌流仿真分析 基于 MATLAB的变压器空载合闸时励磁涌流仿真分析 李兴宁,王书杰 (泰 州职 业技术学 院,江苏 泰州 2 ...

  8. excel导入matlab NaN,Matlab GUI 读取excel文件数据时,出现NaN的问题

    Matlab GUI 读取excel文件数据时,经常会用到如下一段代码,本人有两处不甚明白,请前辈解惑. 源代码 [num,text,raw]=xlsread('123.xls'); for i=1: ...

  9. m基于matlab的协作mimo分布式空时编码技术的仿真

    目录 1.算法描述 2.仿真效果预览 3.MATLAB部分代码预览 4.完整MATLAB程序 1.算法描述 基于matlab的协作mimo分布式空时编码技术的仿真,包括规则LDPC级联D-STBC,M ...

  10. matlab在读取或者导入excel时,服务器出现意外情况

    我使用的matlab版本号:2016 office:2007 问题已解决 在我们向matlab中导入数据的过程中,可能会出现以上的错误提示. 解决方法: 第一步:选择excel选项 第二步:加载项-& ...

最新文章

  1. 快速构建Spring Cloud工程
  2. cocos2d-x lua table数据存储
  3. applicationContext.xml中的使用${}是代表什么意思?
  4. java 堆栈_Java中线程与堆栈的关系
  5. 二维码提升对比度文献调研(2)--Zero-Reference Deep Curve Estimation for Low-Light Image Enhancement
  6. Docker安装禅道项目管理平台zendao-v11.6.x
  7. 编写带对话框界面的OCX
  8. Sentinel降级简介_分布式系统集群限流_线程数隔离_削峰填谷_流量控制_速率控制_服务熔断_服务降级---微服务升级_SpringCloud Alibaba工作笔记0038
  9. 当前最流行的Javaweb框架有哪些?
  10. mysql最左前缀原则学习笔记,in也可以走索引
  11. 企业盈利能力五大指标之:净利率
  12. ARM发展史,初步汇总
  13. 幼儿园php源码,v2.8XYCMS幼儿园建站系统
  14. 关于Win10创意者更新之后蓝屏的修复办法
  15. 极光短信在程序中(JAVA)的使用
  16. [人工智能-深度学习-33]:卷积神经网络CNN - 常见分类网络- LeNet网络结构分析与详解
  17. 智能家居中物联网技术的应用
  18. 事务的提交commit、回滚rollback
  19. 用python输入三个整数判断能否构成三角形_输入3个整数,判断是否能构成三角形,c语言编程...
  20. 全球及中国AV瘘针组行业需求趋势及投资前景预测报告(新版)2022-2027

热门文章

  1. 冬训成果何在?林丹无缘新赛季首冠状态成迷
  2. Draco压缩算法使用
  3. python-安居客-郑州二手房销售信息抓取
  4. R语言KNN分类问题(kknn/class包在iris数据集上的实例)
  5. python三维网格图_python 可视化 ploty 画3dmesh网格图
  6. Nebula Graph - 全文索引
  7. 数据结构-BF算法和KMP算法
  8. 文科三本学计算机专业好吗,三本学费一年大约需要多少
  9. Laravel——微信授权登陆
  10. Java跨年祝福语代码_[商业跨年祝福语]跨年祝福语贺词大全