欢迎来到天天文库
浏览记录
ID:59205860
大小:181.50 KB
页数:8页
时间:2020-09-10
《实验四主成分分析.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、实验四主成分分析1.根据1998年部分地区洪灾损失数据(见表1)进行主成分分析,看看哪些省受灾较轻?受灾最重的是哪几个省?其中x1—x12分别为:受灾面积、成灾面积、绝收面积、受灾/万人次、成灾/万人次、死亡(人)、伤病(人)、紧急转移(人)、倒塌房屋/万间、损坏房屋/万间、死亡大牲畜/万头、直接经济损失/亿元。表一:1998年部分地区洪灾损失指标数据地区x1x2x3x4x5x6x7x8x9x10x11x12蒙130.4107.764.8448.0375.014797.737.059.036.0164.0吉109.764.726.7306.1214.5798.
2、356.062.314.8140.0黑242.9160.693.7581.0521.02156.482.075.016.1218.0皖199.6130.857.11562.01012.893100.426.949.31.0130.5闽69.723.74.4597.5455.81468402195.368.9167.8100.087.9赣241.6193.687.82381.01702.6237304.6117.9168.250.7434.2鄂254.0169.044.51939.01534.7353247.486.9241.227.0357.0湘213.014
3、1.339.92178.01652.4854350.893.9224.583.9422.8贵79.354.828.21378.5992.83153800081.110.776.36.6114.9川128.275.416.91757.91044.35811480637.021.243.113.174.7渝65.349.46.7904.0668.23042171539.117.127.14.555.5滇39.916.13.5462.752.81662357.610.414.81.523.1陕40.826.24.8650.0475.0215306912.79.924
4、.61.843.0解:主成分分析就是设法将原来众多具有一定相关性的变量(如p个变量),重新组合成一组新的相互无关的综合变量来代替原来变量。用R=corrcoef(A)函数求相关系数矩阵:matlab程序如下:A=[130.4107.764.8448.0375.014797.737.059.036.0164.0;109.764.726.7306.1214.5798.356.062.314.8140.0;242.9160.693.7581.0521.02156.482.075.016.1218.0;199.6130.857.11562.01012.893100.4
5、26.949.31.0130.5;69.723.74.4597.5455.81468402195.368.9167.8100.087.9;241.6193.687.82381.01702.6237304.6117.9168.250.7434.2;254.0169.044.51939.01534.7353247.486.9241.227.0357.0;213.0141.339.92178.01652.4854350.893.9224.583.9422.8;79.354.828.21378.5992.83153800081.110.776.36.6114.9;12
6、8.275.416.91757.91044.35811480637.021.243.113.174.7;65.349.46.7904.0668.23042171539.117.127.14.555.5;39.916.13.5462.752.81662357.610.414.81.523.1;40.826.24.8650.0475.0215306912.79.924.61.843.0];R=corrcoef(A)得到相关系数矩阵为:R=[1.00000.97740.83120.62700.69680.15530.69250.73910.77600.62180.2
7、2950.8448;0.97741.00000.88300.63990.71190.13810.62190.72110.75850.57330.19040.8671;0.83120.88301.00000.31710.3910-0.19470.38370.51450.62190.28450.08490.6583;0.62700.63990.31711.00000.97530.66550.30280.63270.46810.60840.24440.7100;0.69680.71190.39100.97531.00000.64020.40200.73150.571
8、00.71100.32070.7989
此文档下载收益归作者所有