Skip to content

Commit

Permalink
灰色神经网络-订单需求预测
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangCongQing committed Feb 8, 2018
1 parent e2921d0 commit 915c19a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
18 changes: 16 additions & 2 deletions AHP层次分析法/ahp_usage.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
clear all
w=[1 1 1 1 1 5 5 1;1 1 1 1 1 5 5 1;1 1 1 1 1 5 5 1;1 1 1 1 1 5 5 1;1 1 1 1 1 5 5 1;1/5 1/5 1/5 1/5 1/5 1 1 1/5;1/5 1/5 1/5 1/5 1/5 1 1 1/5;1 1 1 1 1 1/5 1/5 1];
w=[1 1 1 1 1 5 5 1;
1 1 1 1 1 5 5 1;
1 1 1 1 1 5 5 1;
1 1 1 1 1 5 5 1;
1 1 1 1 1 5 5 1;
1/5 1/5 1/5 1/5 1/5 1 1 1/5;
1/5 1/5 1/5 1/5 1/5 1 1 1/5;
1 1 1 1 1 1/5 1/5 1];
[x,y]=eig(w);
eigenvalue=diag(y);
lamda=max(eigenvalue);
Expand All @@ -8,7 +15,14 @@
cr1
w1=x(:,1)/sum(x(:,1)) %W1和W2的权向量

w=[1 5/3 5/3 5/3 5/3 5 5 1;3/5 1 1 1 1 3 3 3/5;3/5 1 1 1 1 3 3 3/5;3/5 1 1 1 1 3 3 3/5; 3/5 1 1 1 1 3 3 3/5;1/5 1/3 1/3 1/3 1/3 1 1 1/5; 1/5 1/3 1/3 1/3 1/3 1 1 1/5;1 5/3 5/3 5/3 5/3 5 5 1];
w=[1 5/3 5/3 5/3 5/3 5 5 1;
3/5 1 1 1 1 3 3 3/5;
3/5 1 1 1 1 3 3 3/5;
3/5 1 1 1 1 3 3 3/5;
3/5 1 1 1 1 3 3 3/5;
1/5 1/3 1/3 1/3 1/3 1 1 1/5;
1/5 1/3 1/3 1/3 1/3 1 1 1/5;
1 5/3 5/3 5/3 5/3 5 5 1];
[x,y]=eig(w);
eigenvalue=diag(y);
lamda=max(eigenvalue);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
web browser http://www.ilovematlab.cn/thread-64645-1-1.html
% web browser http://www.ilovematlab.cn/thread-64645-1-1.html
%% 清空环境变量
clc
clear
Expand Down Expand Up @@ -130,4 +130,4 @@
title('灰色系统预测','fontsize',12)
xlabel('月份','fontsize',12)
ylabel('销量','fontsize',12)
web browser http://www.ilovematlab.cn/thread-64645-1-1.html
% web browser http://www.ilovematlab.cn/thread-64645-1-1.html

0 comments on commit 915c19a

Please sign in to comment.