本专栏第二十三篇详细记录过灰色关联度的理论,此次记录一下实战中使用的案例
一个因变量,多个自变量
%垃圾量
x0=[47.8 56 58.4 52.9 52.9 51.1 51.1 47.55 53.51 57.26 63.96 68.48 71.05 76.2];
%常驻人口数
x1=[93.48 96.13 100.98 106.27 108.94 109.99 110.85 111.91 113.59 129.12 135.63 142.46 149.36 154.58];
%地区生产总值
x2=[1123.61 1284.61 1498.24 1623.17 1832.63 2441.75 2829.62 3206.57 2958.85 3714.57 4216.52 4601.5 5018.36 6103.69];
%社会消费品零售总额
x3=[210.33 240.23 279.07 322.68 384 457.27 542.28 593.79 649.04 670.9 737.11 803.87 810.4 866.73];
%人均每月消费性支出
x4=[19492 20356 23970 20691.76 23104 26445 25858 28238 35771 41198.37 46924.94 51030.87 52138.24 53848.89];
%游客
x5=[1157.2 1250.29 1185.37 1112.65 1276.8 1301.38 1324.36 1324.53 1393.46 1371.5 1359.4 1384 1359.33 1462.68];
x=[x1;x2;x3;x4;x5];
for i=1:5
for j=1:14
delta(i,j)=x(i,j)-x0(j);
end
end
jc1=min(min(abs(delta')));
jc2=max(max(abs(delta')));
rho=0.5;
for i=1:5
for j=1:14
ksi(j,i)=(jc1+rho*jc2)./(abs(delta(i,j))+rho*jc2);
end
sum(ksi(:,i));
rt=sum(ksi(:,i))/14;
r(1,i)=rt
end
复制