tag 标签: 信息熵经管大学堂:名校名师名课

相关帖子

版块 作者 回复/查看 最后发表
一种用于非线性函数逼近的小波神经网络 人工智能论文版 a智多星 2018-1-19 0 538 a智多星 2018-1-19 00:19:59
基于信息熵理论的连续属性离散化方法 人工智能论文版 DL-er 2018-1-15 0 781 DL-er 2018-1-15 15:40:00
基于熵和SVM多分类器的异常流量检测方法 人工智能论文版 AIworld 2018-1-15 0 561 AIworld 2018-1-15 09:20:03
一种基于信息论的决策表连续属性离散化算法 人工智能论文版 AIworld 2018-1-14 0 633 AIworld 2018-1-14 15:20:00
基于信息熵神经网络的风力发电机故障诊断方法研究 人工智能论文版 DL-er 2018-1-13 0 582 DL-er 2018-1-13 08:00:03
一种新的决策树分裂属性选择方法 人工智能论文版 AIworld 2018-1-11 0 592 AIworld 2018-1-11 01:00:00
基于信息熵的支持向量回归机训练样本长度选择 人工智能论文版 DL-er 2018-1-9 0 466 DL-er 2018-1-9 16:20:04
粗糙模糊集的不确定性度量 人工智能论文版 DL-er 2018-1-8 0 555 DL-er 2018-1-8 21:20:02
用于暂态稳定评估的人工神经网络输入特征离散化方法 人工智能论文版 a智多星 2018-1-8 0 418 a智多星 2018-1-8 09:20:01
离群数据挖掘及其在电力负荷预测中的应用 人工智能论文版 a智多星 2017-10-27 0 573 a智多星 2017-10-27 12:00:06
基于信息熵构造判定树的数据挖掘算法的设计与实现 人工智能论文版 论文库 2017-10-24 0 705 论文库 2017-10-24 17:00:08
基于信息熵的地学空间数据挖掘模型 人工智能论文版 AIworld 2017-9-30 0 893 AIworld 2017-9-30 15:40:03
利用决策树进行数据挖掘中的信息熵计算 人工智能论文版 论文库 2017-9-30 0 908 论文库 2017-9-30 03:20:00
基于决策树C4.5改进算法的交通数据挖掘 人工智能论文版 论文库 2017-9-27 0 922 论文库 2017-9-27 22:40:00
信息熵度量的离群数据挖掘算法 人工智能论文版 人工智能-AI 2017-9-26 0 727 人工智能-AI 2017-9-26 06:40:03
基于粗糙集和 RBF 神经网络的变压器故障诊断方法研究 人工智能论文版 DL-er 2017-9-26 0 594 DL-er 2017-9-26 03:20:00
基于信息熵与词语活跃度的领域词抽取 人工智能论文版 人工智能-AI 2017-9-23 0 656 人工智能-AI 2017-9-23 18:00:06
一种基于信息熵的异常数据挖掘算法 人工智能论文版 论文库 2017-9-18 0 825 论文库 2017-9-18 04:20:04
如何计算联合概率? attach_img R语言论坛 回潮5 2017-7-4 3 1856 回潮5 2017-7-9 20:42:07
悬赏 解答数学题 - [悬赏 100 个论坛币] attach_img 悬赏大厅 xiaqcpu 2015-3-22 3 1283 xpz186 2015-3-29 13:05:13

相关日志

分享 计算字符型变量的信息熵
intheangel 2014-6-24 21:21
%macro entropy(row_data,destination); proc contents data=row_data(drop=destination) noprint out=var_list;run; data var_cha_list; set var_list; where type=2; keep name; run; /*first we need to get the character variable which we can calculate the entropy*/ %if %sysfunc(exist(var_cha_list)) ne 0 %then %do; proc datasets lib=work nolist; delete entropy_variable; quit; data entropy_variable; length variable $40 entropy 8; stop; run; %end; /*create the table entropy_variable to store the results*/ %let dsid = %sysfunc(open(var_cha_list)); %if dsid gt 0 %then %do; %let nobs = %sysfunc(attrn(dsid,nobs)); %do i=1 %to nobs;/*start resolve this question, get the answers*/ %let rc = %sysfunc(fetch(dsid,i)); %let varnume = %sysfunc(varnum(dsid,name)); %let variable = %sysfunc(getvarc(dsid,varnume)); ods html close; ods output CrossTabFreqs=pro; proc freq data=row_data; table variable * destination; run; ods output close; ods html; /*use the freq proc to summary the data we need*/ data pro_temp(keep=variable percent); set pro(keep=variable percent destination); where destination='' and variable^=''; run; data pro_temp_2(keep=variable rowpercent); set pro(keep=variable rowpercent destination); where destination^='' and variable^=''; run; proc sql; create table final as select * from pro_temp as a inner join pro_temp_2 as b on a.variable.=b.variable.; quit; /*organize the data so we can use it directly*/ data final; set final; retain entropy 0; if rowpercent^=0 and rowpercent^=100 then entropy=entropy+rowpercent/100*log2(rowpercent/100)*percent/100; else entropy=entropy; run; /*calculate the entropy*/ data entropy_variable(keep=variable entropy); retain variable; set final end=eof; variable="variable"; entropy=-entropy; if eof=1; run; proc append base=entropy_variable data=entropy_variable force;run; /*get all the answer together*/ %end; %let dsid = %sysfunc(close(dsid)); %end; /*Worte by Albert.feng , if you use this code please note.*/ %mend entropy; %entropy(c,play_golf);
个人分类: macro|58 次阅读|0 个评论
GMT+8, 2025-12-24 17:30