近似熵的一种快速实用算法

Pincus提出的近似熵算法中有很多冗余的计算,效率低,速度慢,不利于实际应用,洪波等人在定义的基础上引入二值距离矩阵的概率,提出了一种实用快速的算法。

  1. function ApEn=EntropyCompute(sig,m,r0)
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. % 计算一维信号的近似熵,采用快速算法
  4. % sig: 待求近似熵的源信号
  5. % m: 一般取 2
  6. % r0: 一般取0.1 ~ 0.25
  7. % Ref: 近似熵:一种应用于短数据的的复杂性度量,杨福生
  8. % 近似熵及其在机械设备故障诊断中的应用,胥永刚
  9. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  10. N = size(sig,1);
  11. r=r0*std(sig);
  12. d=zeros(N,N);
  13. %%% 计算距离矩阵 %%%
  14. for i=1:N
  15. d(i,:)=abs(sig(i)-sig) < r;
  16. end
  17. %%% 计算C2 %%%
  18. c2=zeros(1,N-m+1);
  19. for i=1:N-m+1
  20. for j=1:N-1;
  21. buf = d(i,j) & d(i+1,j+1);
  22. c2(i)=c2(i)+buf;
  23. end
  24. end
  25. Fi(1)=sum(log(c2))/(N-m+1);
  26. m=m+1;
  27. %%% 计算C3 %%%
  28. c3=zeros(1,N-m+1);
  29. for i=1:N-m+1
  30. for j=1:N-2;
  31. c3(i)=c3(i)+(d(i,j) & d(i+1,j+1) & d(i+2,j+2));
  32. end
  33. end
  34. Fi(2)=sum(log(c3))/(N-m+1);
  35. ApEn=Fi(1)-Fi(2);
  36. return;

The algorithm of entropy realization的更多相关文章

  1. A Gentle Introduction to the Gradient Boosting Algorithm for Machine Learning

    A Gentle Introduction to the Gradient Boosting Algorithm for Machine Learning by Jason Brownlee on S ...

  2. Akumuli时间序列数据库——列存储,LSM,MVCC

    Features Column-oriented time-series database. Log-structured append-only B+tree with multiversion c ...

  3. Lempel-Ziv algorithm realization

    Lempel-Ziv 复杂度程序 随着人们对非线性方法的分析越加深入,他们发现,虽然关联维度和最大李雅谱诺夫指数在分析脑电时具有一定的帮助,但是它们对数据的依赖性太强,对干扰和噪 声太敏感,而且要得到 ...

  4. [转载] Calculating Entropy

    From:  johndcook.com/blog For a set of positive probabilities pi summing to 1, their entropy is defi ...

  5. hdu 1053 Entropy

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1053 Entropy Description An entropy encoder is a data ...

  6. ZOJ 3827 Information Entropy 水题

    Information Entropy Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/sh ...

  7. Reducing the Dimensionality of data with neural networks / A fast learing algorithm for deep belief net

    Deeplearning原文作者Hinton代码注解 Matlab示例代码为两部分,分别对应不同的论文: . Reducing the Dimensionality of data with neur ...

  8. [POJ 1521]--Entropy(哈夫曼树)

    题目链接:http://poj.org/problem?id=1521 Entropy Time Limit: 1000MS    Memory Limit: 10000K Description A ...

  9. ZOJ3827 ACM-ICPC 2014 亚洲区域赛的比赛现场牡丹江I称号 Information Entropy 水的问题

    Information Entropy Time Limit: 2 Seconds      Memory Limit: 131072 KB      Special Judge Informatio ...

随机推荐

  1. AngularJS中$watch

    $watch在digest执行时,如果watch观察的value与上一次执行时不一样时,就会被触发.angularjs内部的watch实现了页面随model的及时更新.$watch 方法在用的时候主要 ...

  2. hive 导入数据

    1.load data load data local inpath "/home/hadoop/userinfo.txt" into table userinfo; " ...

  3. 洛谷 [POI2007]BIU-Offices 解题报告

    [POI2007]BIU-Offices 题意 给定\(n(\le 100000)\)个点\(m(\le 2000000)\)条边的无向图\(G\),求这个图\(G\)补图的连通块个数. 一开始想了半 ...

  4. git untrack file

    git update-index should do what you want This will tell git you want to start ignoring the changes t ...

  5. gdb打印STL和boost容器

    http://note.youdao.com/noteshare?id=b581e0db0084b6ba3011d9d27d372c91

  6. 手脱PEncrypt 4.0

    1.载入PEID PEncrypt 4.0 Gamma / 4.0 Phi -> junkcode [Overlay] 2.载入OD,没什么头绪,忽略所有异常,用最后一次异常法shift+F9运 ...

  7. python的StringIO模块

    StringIO经常被用来作字符串的缓存,因为StringIO的一些接口和文件操作是一致的,也就是说同样的代码,可以同时当成文件操作或者StringIO操作. 一.StringIO中的常用方法 1.r ...

  8. html常见页面动画插件

    wow.js页面滚动动画 scrollever.js页面滚动动画 textillate.js页面字体效果 ihover.js手表hover效果插件 loaders.css页面预加载动画

  9. fmt:formatNumber use locale display negative currency in -$xxx.xx format in JSTL

    First, we want to know our own locale,how to display the locale in a JSTL? <c:out value="${p ...

  10. NOIP模拟赛16

    NOIP2017金秋冲刺训练营杯联赛模拟大奖赛第一轮Day2 期望得分:100+100+ =200+ 实际得分:100+40+70=210 T1天天寄快递 直接模拟,代码丢了...... T2天天和不 ...