SlideShare a Scribd company logo
1 of 37
Download to read offline
ววิิิิธธีีีีโโโโคครงขข่่าา่่ยปรระะสสาาทเเททีีีียมแแลละะววิิิิธธีีีีจจีีีีนเเนนตติิิิกออััััลกอรริิิิททึึึึมสสํํํำาหรรัััับ 
กกาารททํำานนาายกกาารเเกกิิดไไฟฟไไหหมใใ้้นททีี่่พพัักออาาศศััย 
Neural network and GA approaches for dwelling fire occurrence prediction 
L.Yang, C.W.Dawson, M.R.Brown M.Gell 
ออาาจจาารยย์์ททีี่่ปรรึึกษษาา 
ผผูู้้ชช่่วยศศาาาาสตรราาาาจจาาาารยย์์ ดร.กมลชนก พพาาาานนิิชกกาาาาร 
นนํำาเเสสนอโโดดย 
นนาาาางสสาาาาวสสิิรริิกกััลยยาาาา ปรระะะะมวล รหหััสปรระะะะจจํำาาาตตััว 50304207 
รราายววิิชชาาสสััมมนนาา 2 ปกกีีาารศศึึกษษาา 2552
หหััวขออ้้ททีี่่นนํำาาเเเสสนอ 
1. บทนำ (Introduction) 
2. กกาารเเลลือกตตัวแแปปร (Input selection) 
3. การลดจำนวนตัวแปร (Reducing input dimension) 
4. การสร้างโมเดลโดยวิธีโลจิสติก (A logistic model for prediction) 
5. กกาารสรรา้างโโมมเเดดลโโดดยววิธธีโโคครงขขา่ายปรระะสสาาทเเททียม (Neural network based prediction 
model) 
6. กกาารสรรา้างโโมมเเดดลโโดดยววิธธีจจีเเนนตติกออัลกอรริททึม (GA based prediction model) 
7. การเปรียบเทียบโมเดลทั้งสามโมเดล 
8. อภิปรายและสรุปผล (Discussion and conclusions)
บทนนํำาาา (Introduction) 
1. พยากรณ์การเกิดไฟไหม้ในที่พักอาศัยเมือง Derbyshire ที่เป็นพื้นที่ในประเทศ 
ออังกฤษ 189 เเขขต 
2. ใช้วิธีวิเคราะห์องค์ประกอบหลักในการลดตัวแปร โดยพิจารณาทั้งหมด 7 ตัวแปร เหลืือเพีียง 3 ตััวแปปร 
3. วิธีการสร้างโมเดลที่ใช้ในการพยากรณ์ทั้งหมด 3 วิธี ได้แก่ 
3.1 วิธีโลจิสติกโมเดล 
3.2 วิธีโครงข่ายประสาทเทียม 
3.3 วิธีจีเนติกอัลกอริทึม 
4. เเปปรรียบเเททียบคววาามแแมมนน่ยยำาของโโมมเเดดล โโดดยใใชชเ้เกกณฑเ์เปปรรียบเเททียบโโมมเเดดลดว้วย Mean 
Square Error
กกาารเเลลืือกตตััวแแปปรใใใในนกกาารสรราา้้งโโโโมมเเดดล
กกาาาารเเเเลลลืือกตตััวแแแแปปร (Input selection) 
Table 1 
Correlation between the number of dwelling fires and the possible influencing factors 
Correlation Population Unemployment Maximum 
temperature 
Minimum 
temperature 
Number of 
Dwelling fires 
0.528 0.554 -0.044 -0.0306 
Table 2 Correlation between the number of dwelling fires and the population distribution 
Correlation Population in various ages 
0~4 5~11 12~18 19~64 65~74 Over 75 
Number of 
Dwelling fires 
0.564 0.527 0.496 0.50 0.486 0.523
กกาาาารเเเเลลลืือกตตััวแแแแปปร (Input selection) 
ตัวแปรที่นำมาพิจารณาได้แก่ 
ตัวแปรที่ 1 AGE0 คือประชากรที่มีอายุต่ำกว่า 4 ปี 
ตัวแปรที่ 2 AGE5 คือประชากรที่มีอายุ5 ถึง 11 ปี 
ตัวแปรที่ 3 AGE12 คือประชากรที่มีอายุ12 ถึง 18 ปี 
ตตัวแแปปรทที่ 4 AGE19 คคือปรระะชชาากรทที่มมีออาายยุ19 ถถึง 64 ป  
ตัวแปรที่ 5 AGE65 คือประชากรที่มีอายุ65 ถึง 74 ปี 
ตััวแปปรทีี่ 6 AGE75 คืือประชากรทีี่มีีอายุ75 ปปีีขึึ้นไไปป 
ตัวแปรที่ 7 UNEMP คือประชากรที่ว่างงาน
กกาารลดจจํำานวนตตััวแแปปรออิิสรระะ
กกาาาารลดจจํำาาานวนตตััวแแแแปปร (Reduce Input dimension) 
ใช้วิธี Principal Component Analysis: PCA ในการลดจำนวนตัวแปร
กกาาาารเเเเลลลืือกตตััวแแแแปปร (Input selection) 
โครงสร้างการพยากรณ์การเกิดไฟไหม้
กกาาาารแแแแบบง่่งขอ้้อมมููลใใใในนกกาาาารสรราาาา้้งแแแแลลละะะะตรวจสอบโโโโมมเเเเดดล 
ข้อมูลที่ใช้ในการสร้างโมเดลและตรวจสอบโมเดล 
ข้อมูลไฟไหม้จาก 189 เขต 
181 เขต 8 เขต 
Training Set Test Set
ตตััวเเเปปรรีียบเเเทททีียบผลลลััพธธ์์ 
ตัวเปรียบเทียบผลลัพธ์ที่ใช้กับชุดข้อมูลทดสอบ 
ค่าความคลาดเคลื่อนเฉลี่ยกำลังสอง (Mean squared error :MSE) 
− Σn 
= 
2 
i i 
i 1 
(A M ) 
MSE = i=n 
โดยที่ Ai คือจำนวนไฟไหม้ที่เกิดขึ้นจริง 
Mi คคือเเปปน็นคคา่าพยยาากรณจ์จำานวนกกาารเเกกิดไไฟฟไไหหม  
n คือจำนวนข้อมูลของชุดทดสอบ
ววิิิิธธีีีีกกาารททีีีี่่ใใใใชช้้ใใ้้ใในนกกาารสรราา้้้้งโโโโมมเเดดลใใใในนกกาารพยยาากรณณ์์์์
Logistic Regression Analysis
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีโโโโลลจจิิสตติิก (A logistic model for prediction) 
โมเดลการถดถอยโลจิสติก 
log(FIRE + l) = a + b × PC1 + c × PC2 + d × PC3 1 
การประมาณค่าพารามิเตอร์ a, b, c และ d สามารถหาได้จากวิธีการประมาณค่ากำลัง 
สองน้้อยสุด (Least Square Estimation: LSE) 
Table 3 Estimates of the parameters of the logistic model 
Model Constant (a) PC1(b) PC(c) PC(d) 
Parameter estimate 0.421 0.07099 -0.0165 0.0432 
Standard error 0.019 0.008 0.026 0.028
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีโโโโลลจจิิสตติิก (A logistic model for prediction) 
ผลลัพธ์ที่ได้ 
คค่าา MSE มมีคคา่าเเทท่าากกับ 4.875
Neural Network
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
โมเดลโครงข่ายประสาทเทียม (Neural Network Model) 
คือโมเดลทางคณิตศาสตร์์ สำหรับประผลสารสนเทศด้้วยการคำนวณแบบโครงขา่ย 
โดยได้รับแนวคิดจากการทำงานของโครงข่ายประสาทในสมองมนุษย์ 
รูปที่ ก. โมเดล Neuron ในสมองมนุษย์ รูปที่ ข. โมเดล Neuron ในคอมพิวเตอร์
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
สถาปัตยกรรมของโครงข่าย 
1 1. Feedback network ข้ขอมมูลที่ทประมวลผลในวงจรขาข่ายจะมมีการปป้อนกลลับเขาเข้าไปยยังวงจรขาข่าย 
หลายๆ ครั้งจนกระทั่งได้คำตอบออกมา (Recurrent network) 
Input nodes Output nodes 
รูปที่ ค. สถาปัตยกรรมของ Feedback network
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
2. Feedforward network ข้อมูลที่ประมวลผลในวงจรข่ายจะถูกส่งไปในทิศทางเดียวโดย 
ไม่มีการย้อนกลับของขอ้มููล หรือ Node ใน layer เดียวกันก็ไม่มีการเชื่อมต่อกัน 
Input layer Hidden layers Output layer 
รูปที่ ง. สถาปัตยกรรมของ Feedforward network
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
Transfer Function 
1. Sigmoid Function 
2. Binary Function 
3. Linear Function 
Algorithm 
1. Backpropagation Algorithm 
2. Levenberg-Marquardt Algorithm 
3. Quasi-Newton Algorithm 
4. Conjugate Gradient Algorithm
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
ข้อมูลที่ใช้ในการสร้างโมเดลและตรวจสอบโมเดล 
ข้อมูลไฟไหม้จาก 189 เขต 
181 เขต 8 เขต 
Training Set Validation Set Test Set
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
โมเดลโครงข่ายประสาทเทียมที่เหมาะสมกับปัญหามากที่สุด 
PC1 
Sigmoid Linear PC2 Y Levenberg-Marquardt 
PC3 
Input 
(3 i ) 
Output 
(1 t t) 
Hidden1 
(10 d ) 
Hidden2 
inputs) nodes) (25 nodes) output)
กกาาาารพยยาาาากรณโโ์์โโดดยววิิธธีีโโโโคครงขขาา่่าายปรระะะะสสาาาาทเเเเทททีียม (Neural network model) 
ผลลัพธ์ที่ได้ 
คค่าา MSE มมีคค่าาเเทท่าากกับ 2.375
Genetic Algorithm
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
จีเนติกอัลกอริทึม (Genetic algorithm: GA) 
เป็็นวิธีการค้น้หาคำตอบซึึ่งเป็็นคำตอบที่เหมาะสมที่สุด 
โดยได้แนวความคิดมาจากทฤษฎีวิวัฒนาการ Charles Darwin 
จีเนติกอัลกอริทึมเป็นการคำนวณอย่างหนึ่งที่กล่าวได้ว่ามี 
“วิวัฒนาการ” อยู่ในขั้นตอนของการหาคำตอบ
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
องค์ประกอบของจีเนติกอัลกอริทึม 
1. รูปแบบโครโมโซม ใช้นำเสนอรูปแบบของคำตอบที่เป็นไปได้สำหรับปัญหา 
1.1 Binary Encoding 
1.2 Permutation Encoding 
1.3 Valued Encoding 
1.4 Tree Encoding 
2. กกาารสรรา้างปรระะชชาากรตน้นกกำาเเนนิด (Initial Population) คคือกกาารสรรา้างกลลุ่มปรระะชชาากร 
เริ่มต้นที่ใช้สำหรับหาคำตอบ (ใช้แบบ Random) 
3. ฟังก์ชันประเมินค่าความเหมาะสม (Fitness Evaluation) เพื่อให้คะแนนแต่ละ 
ทางเลือก
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
องค์ประกอบของจีเนติกอัลกอริทึม 
4. จีีเนติิกโโอเปปอเรเตอร์์(Genetic Operator) ซึึ่งใใช้้ใในการพััฒนาหาคํำตอบทีี่ดีีกว่่าจาก 
ประชากรเดิมที่มีอยู่ ได้แก่ 
4.1 Reproduction 
4.2 Crossover 
4.3 Mutation 
5. ค่าพารามิเตอร์ต่างๆ ที่ต้องใช้สำหรับจีเนติกอัลกอริทึม ได้แก่ 
5.1 Crossover Probability 
5.2 Mutation Probability 
5.3 Population size
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm)
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
ข้้อมูลเขตทีี่PC1 PC2 PC3 Y 
1 X1 Y1 Z1 0 
2 X2 Y2 Z2 3 
3 X3 Y3 Z3 9 
4 X4 Y4 Z4 5 
5 X5 Y5 Z5 1 
6 X6 Y6 Z6 2 
7 X7 Y7 Z7 7 
8 X8 Y8 Z8 0 
9 X9 Y9 Z9 0 
# # # # # 
181 X181 Y181 Z181 12
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
กระบวนการแยกคุณลักษณะ 
1 Guide point = Xpi , Ypi , Zpi 
โดยที่ P คือลำดับของ Guide point 
i คืคอจาจำนวน Guide point (i= 1 2 1,2,…,k) 
Xp1 p1 Y p1 p1 Zp1 . . . pk Xpk Y pk Zpk pk 
= 1 Chromosome 
1 
N k 2 2 2 1/ 2 
= Σ − + − + − + 2 
f min((X X ) (Y Y ) (Z Z ) ) (1 E /k) 
fitness j 1 i pj i pj i pj 
N = 
= 
i 1
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
Start 
k=1 k is the number of guide point 
Desired valued = 50 Run GA k=k+1 
Generation = 20 
Fitness 
<=the desired value no 
E d 
yes 
End 
Fig. 6 An Iterative GA
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
Xp1 Y p1 Zp1 . . . Xpk Y pk Zpk = 1 Chromosome 
ในรอบที่ 1 Xp1 Y p1 Zp1 
ในรอบที่ 2 Xp1 Y p1 Zp1 Xp2 Y p2 Zp2 
ใในรอบทีี่ k Xp1 Y p1 Zp1 . . . Xpk Y pk Zpk
กกาาาารพยยาาาากรณโโโโ์์ดยววิิธธีีจจีีเเเเนนตติิกออััลกอรริิททึึม (Genetic Algorithm) 
ผลลัพธ์ที่ได้ 
คค่าา MSE มมีคค่าาเเทท่าากกับ 2.875
สรรุุปผลจจาากกกาารทดสอบโโโมมเเดดล
เเเเปปรรีียบเเเเทททีียบกกาาาารพยยาาาากรณ  3 ววิิธธีี 
Logistic Model Neural Network Model Genetic Algorithm Model 
MSE = 4.875 MSE = 2.375 MSE = 2.875 
ขข้อด ดี ขข้อด ดี ขข้อด 
ดี 
ไม่ยุ่งยากและง่ายตอ่การใช้งาน - แก้ปัญหาความไม่เป็นเชิงเส้น 
- ง่ายต่อความเข้าใจและเห็นกระ 
คำนวลัพธ์ได้รวดเร็ว 
คาณผลลธไดเร- มีีความสามารถใในการปรับเปปลีี่ยน บวนกกาารททุกขขั้นตอน 
และสามารถเรียนรู้สภาพแวดล้อม 
ใหมม่ๆได 
ไดั 
ข้อเสีย ข้อเสีย ข้อเสีย 
ความสมพนธจรงซบซ้อน 
มากกว่าที่จะใช้ Logistic 
model 
ั้์ิั้ ํั์ีั้ ํ 
- การคานวณผลลพธเสยเวลามาก 
ในการคำนวณแต่ละโครงข่าย 
กระบวนการซบซ้อน และคาตอบ 
ที่ได้อาจไม่ใช่คำตอบที่ดีที่สุด
สรรุุปผล 
ข้อสรุปจากงานวิจัย 
1. ผลลัพธ์การทำนายไม่เป็นที่น่าพอใจ เนื่องจากขาดตัวแปรที่มีผลต่อการเกิดไฟ 
ไหม้เช่นข้อู มูลทางด้านพฤติกรรมในชีวิตประจำวันของมฤุ 
นุษย์ 
2. อุณหภูมิสูง/ต่ำ มีผลต่อจำนวนการเกิดไฟไหม้น้อยมาก 
3. เทคโนโลยีด้านโครงข่ายประสาทเทียมและจีเนติกอัลกอริทึม สามารถ 
นํำมาประยุกต์ใใชแ้้ละพัฒนาตัวแบบใในการทํำนายการเกิดไไฟฟไไหม้ไ้ได้้
Neuralnetworandgeneticalgorithm 090715055331-phpapp01

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Neuralnetworandgeneticalgorithm 090715055331-phpapp01