## 2.思路流程

·每个城镇的平均犯罪率；

·住宅用地超过500平米的比例；

·每个城镇非商业用地的比例；

·距离海洋的距离在1公里内，则为1，否则为0；

·氧化物浓度；

·每个房子的平均房间数；

·1940前自建房屋的比例；

·到购物中心的权值距离；

·高速公里的标号；

·每1万美元的管理费；

·教师比例；

·20岁以下的人口比例；

·退休人口比例。

## 三、部分MATLAB仿真

```clc;
close all;
clear all;
warning off;
%% Parameters initialization
%Display the original data
figure;
subplot(4,4,1);plot(x(1,:));title('Per capita crime rate per town');
subplot(4,4,2);plot(x(2,:));title('Proportion of residential land zoned for lots over 500m2');
subplot(4,4,3);plot(x(3,:));title('Proportion of non-retail business acres per town');
subplot(4,4,4);plot(x(4,:));title('1 within 1km from the sea, 0 otherwise');
subplot(4,4,5);plot(x(5,:));title('Nitric oxides concentration (parts per 10 million)');
subplot(4,4,6);plot(x(6,:));title('Average number of rooms per dwelling');
subplot(4,4,7);plot(x(7,:));title('Proportion of owner-occupied units built prior to 1940');
subplot(4,4,8);plot(x(8,:));title('Weighted distances to a main shopping center');
subplot(4,4,9);plot(x(9,:));title('Index of accessibility to motorways');
subplot(4,4,10);plot(x(10,:));title('Full-value of council rate per \$10,000');
subplot(4,4,11);plot(x(11,:));title('Pupil-teacher ratio by town');
subplot(4,4,12);plot(x(12,:));title('Population below the age of 20');
subplot(4,4,13);plot(x(13,:));title('Percentage of retirees');
figure;
plot(10000*t,'r');title('PRICE');grid on
%% Select multiple data,train neural network
%step1：parameter
net                   = fitnet(10);
net.trainParam.epcohs = 1000;%train times
net.trainParam.goal   = 0.0001;%aim error
%step2：train
net                   = train(net,x,t);
%% By using the neural network to predict the price of houses
view(net);
y1 = net(x);%predict
%% Shows the result
figure;
subplot(221);plot(t);
title('Original price');axis([0,length(t),0,max(t)]);
subplot(222);plot(y1);
title('Predict prices ');axis([0,length(y1),0,max(y1)]);
subplot(223);plot(y1);hold on;plot(t,'r');hold off;
legend('Predict prices','Original price');
title('Predict prices');axis([0,length(y1),0,max(y1)]);
subplot(224);plot(y1 - t,'k');
title('Prediction error ');
figure
plot(y1);hold on;plot(t,'r');hold off;
legend('Predict prices','Original price');
title('Predict prices');axis([0,length(y1),0,max(y1)]);
figure
plot(y1 - t,'k');grid on;
title('Prediction error ');axis([0,length(y1),-50,50]);
%save networks
save net.mat net```

## 四、仿真结论分析

net                = fitnet(10);

net.trainParam.epcohs = 1000;

net.trainParam.goal   = 0.0001;

#### evaluate: outputs = net(inputs)

net= train(net,x,t);

## 五、参考文献

[01]White, H. Economic prediction using neural networks: the case of IBM Gaily stock returns, Neural Networks, IEEE International Conference on,1988,2(6): 451-458.

[02]Kamijo K &Tanigawa T,Stock Price Pattern Recognition: A Recurrent Network Approach. Proceeding of the International Joint Conference on Neural Networks,1990, 215-222.

[03]Youngohc Yoon&George Swales, Predicting Stock Price Per-Formance: A Neural Network Approach, System Sciences, International Conference on，1991. Proceedings of the Twenty-Fourth Annual Hawaii1991,4:156-162.A05-03