Download - Matlab6.5 BPN Model
-
8/17/2019 Matlab6.5 BPN Model
1/40
-Artificial Neural Network-
Matlab 操作介紹 - 以類神經網路 BPN Model 為例
朝陽科技大學
資訊管理系
李麗華 教授
-
8/17/2019 Matlab6.5 BPN Model
2/40
朝陽科技大學 李麗華 教授 2
資料準備說明
•要訓練 ANN 前應先依解決的議題 , 準備好四!"training data ! , Training data 的 Target ! , Test data! , Test 的 Target ! .
•#$%資料&'()* column +, ( -, )
./0 matlab.
12先34資料()的56說明 .
1.Inut !attern 78
2.Inut !attern (9".Target !attern 78
#.Test !attern 7:
-
8/17/2019 Matlab6.5 BPN Model
3/40
朝陽科技大學 李麗華 教授 "
1. 1;?6 !attern 的78
1, 2, 3
4, 5, 6
7, 8, 9
0
-
8/17/2019 Matlab6.5 BPN Model
4/40
朝陽科技大學 李麗華 教授 #
1 Word @A78B 10 C patterns
D好E(9
2. !attern (9 ( F )
-
8/17/2019 Matlab6.5 BPN Model
5/40
朝陽科技大學 李麗華 教授 $
2. !attern (9 ( F )
•將每! pattern
"#$%& , 將"#'( ,)*+,-./
-
8/17/2019 Matlab6.5 BPN Model
6/40
朝陽科技大學 李麗華 教授 %
!attern (9 ( F )
GHIJ
-
8/17/2019 Matlab6.5 BPN Model
7/40 朝陽科技大學 李麗華 教授 &
!attern (9 ( F )
GHIJ
-
8/17/2019 Matlab6.5 BPN Model
8/40 朝陽科技大學 李麗華 教授 '
!attern (9 ( F )
B#$C pattern (?$K ( L$%M0資料 ), N26
0 1 1 0 00 0 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
01100 00100 00100 00100 00100
-
8/17/2019 Matlab6.5 BPN Model
9/40 朝陽科技大學 李麗華 教授
!attern (9 ( F )
O1 10 C;
-
8/17/2019 Matlab6.5 BPN Model
10/40 朝陽科技大學 李麗華 教授 1
!attern (9 ( F )
• T matlab U0資料V1-, (column b* column)UW , O1'B#$% data attern (?-, + XY$ ( 1 Excel ?Z[ )
• B先前的 1 K資料 , 先A\*]
• .^_ cel, `ab]
• \*]
+ XYh ( 1 Matlab ?Z[ )• -i^_ matlab Z[ , j_/0X,(9 data attern• k /atlab 的flKm , M0 ‘!g Ln@A(9 ,
6N 0 o/0$C train attern, p!g? trainset.tt
, qr /atlab sM0 trainset
(9*-,
-
8/17/2019 Matlab6.5 BPN Model
11/40 朝陽科技大學 李麗華 教授 11
!attern (9*-, - _cel
cdEtuves
< XY$>
(
-
8/17/2019 Matlab6.5 BPN Model
12/40 朝陽科技大學 李麗華 教授 12
< XY$>
!attern (9*-, - _cel
(9*-, _
-
8/17/2019 Matlab6.5 BPN Model
13/40 朝陽科技大學 李麗華 教授 1"
< XY$>
!attern (9*-, - _cel
(9*-, _
-
8/17/2019 Matlab6.5 BPN Model
14/40 朝陽科技大學 李麗華 教授 1#
< XY$>
!attern (9*-, - _cel
資0
1*
+2
/
(9*-, _
-
8/17/2019 Matlab6.5 BPN Model
15/40 朝陽科技大學 李麗華 教授 1$
\*]<!E_tab J,
< XY$>
!attern (9*-, - _cel
-
8/17/2019 Matlab6.5 BPN Model
16/40 朝陽科技大學 李麗華 教授 1%
1. 先^_ File wx, B trainingpattern ! , /0Matlab m
2. .M0yfl, 1z(9pattern
Pattern (9 ( F ) < XYh>
-
8/17/2019 Matlab6.5 BPN Model
17/40 朝陽科技大學 李麗華 教授 1&
". Target !attern 78 (1)
1. 3456789:;< 0~9 :=>?@
-{依|training pattern :ABCD作
target 資0 . 以@-;
-
8/17/2019 Matlab6.5 BPN Model
18/40 朝陽科技大學 李麗華 教授 1'
". Target !attern 78 (2)
[\
t rget
資0]^_`*+2/abcd
! tl b.
Input PatternTarget Pattern '&%$#"21
1
2
3
4
5...
0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0...
}
-
8/17/2019 Matlab6.5 BPN Model
19/40 朝陽科技大學 李麗華 教授 1
#. Test !attern 78
1
3
9
0
{01100 00100 00100 00100 01110}
{01110 00010 01110 00010 01110}
{01110 01010 01110 00010 00100}
{00100 01010 01010 01010 00100}
[
"NN
網路efgh
,
Ti_jk網路:lmn
,
7
i_op`H q
tet p ttern
Cjr網路:+
s
.
-
8/17/2019 Matlab6.5 BPN Model
20/40 朝陽科技大學 李麗華 教授 2
/atlab ~• (1) + 先 /0O€資料
/0O€資料 :
1.Training data 2.Target data
-
8/17/2019 Matlab6.5 BPN Model
21/40 朝陽科技大學 李麗華 教授 21
/atlab ~• (2) - /0O€資料
t
Train Pattern7uvw
,
將xcd
-
8/17/2019 Matlab6.5 BPN Model
22/40
朝陽科技大學 李麗華 教授 22
/atlab ~• (") - /0O€資料
“tu Next”
-
8/17/2019 Matlab6.5 BPN Model
23/40
朝陽科技大學 李麗華 教授 2"
/atlab ~• (#)- /0O€資料
t“u Finish”
-
8/17/2019 Matlab6.5 BPN Model
24/40
朝陽科技大學 李麗華 教授 2#
/atlab ~• ($) + ‚ ANN ƒ„Z[
“kflK2 nntool”1‚…†‡ˆ‰Š
-
8/17/2019 Matlab6.5 BPN Model
25/40
朝陽科技大學 李麗華 教授 2$
“tu Import”,BO€資料/0
/atlab ~• (%) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
26/40
朝陽科技大學 李麗華 教授 2%
1. B Train Pattern “7:? Input” +,2. B Target Pattern 7:? Targets +,
/atlab ~• (&) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
27/40
朝陽科技大學 李麗華 教授 2&
‹O€資料/0Œ ,
“Lntu New Network, 1ƒ„…†‡ˆ‰Š
/0的資料
/atlab ~• (') + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
28/40
朝陽科技大學 李麗華 教授 2'
7:ˆ‰的M0資料Ž
/atlab ~• () + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
29/40
-
8/17/2019 Matlab6.5 BPN Model
30/40
朝陽科技大學 李麗華 教授 "
7: BPN ’“”的†‡C; !a"er 1
/atlab ~• (11) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
31/40
朝陽科技大學 李麗華 教授 "1
7: BPN M–”O€的†‡C; !a"er 2#
/atlab ~• (12) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
32/40
朝陽科技大學 李麗華 教授 "2
7:ˆ‰O€的—˜™„š;Œ ,
“i›tu Train..”,B Train Pattern M01zˆ‰@A學œŠ
/atlab ~• (1") + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
33/40
朝陽科技大學 李麗華 教授 ""
tu Training O€的
input pattern tu target pattern
/atlab ~• (1#) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
34/40
朝陽科技大學 李麗華 教授 "#
1. 7:訓練ž;
2. 7:學œŸ learning rate
$. ‹7:¡¢—˜š;Œ , “Lntu Train Network”
@Aˆ‰的 Training
/atlab ~• (1$) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
35/40
朝陽科技大學 李麗華 教授 "$
ˆ‰訓練£¤
/atlab ~• (1%) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
36/40
朝陽科技大學 李麗華 教授 "%
/0 test pattern,—˜¥¦NsO§
/atlab ~• (1&) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
37/40
朝陽科技大學 李麗華 教授 "&
tuOƒ„的ˆ‰ŠŒ ,“tu %imulate..” 1@AŠ
/atlab ~• (1') + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
38/40
朝陽科技大學 李麗華 教授 "'
1. tu要@A¨©的 test pattern
2. @AŠ
/atlab ~• (1) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
39/40
朝陽科技大學 李麗華 教授 "
1. “tu &xport..”
2. Boª«的M–¬ &xport $. ®:Œ , “tu &xport”
/atlab ~• (2) + ‚ ANN ƒ„Z[
-
8/17/2019 Matlab6.5 BPN Model
40/40
/atlab ~• (21) + ‚ ANN ƒ„Z[
¯°±²³h2 ,1´µp¬