AI-FML for Inference of Percentage of Votes Obtained and Real-life - - PowerPoint PPT Presentation

ai fml for inference of percentage of votes
SMART_READER_LITE
LIVE PREVIEW

AI-FML for Inference of Percentage of Votes Obtained and Real-life - - PowerPoint PPT Presentation

AI-FML for Inference of Percentage of Votes Obtained and Real-life Applications Team : Yangming and Dominic Presenters: Ying-Tai Chen, Seng-Yo Huang From: St. Dominic Catholic High School Yangming junior high school , Kaohsiung, Taiwan Outline


slide-1
SLIDE 1

AI-FML for Inference of Percentage of Votes Obtained and Real-life Applications

Team :Yangming and Dominic Presenters: Ying-Tai Chen, Seng-Yo Huang From: St. Dominic Catholic High School

Yangming junior high school , Kaohsiung, Taiwan

slide-2
SLIDE 2

Outline

 Introduction  Machine learning Flowchart  FML-based Knowledge Base & Rule Base  Fuzzy Inference Mechanism  Machine Learning – Genetic and PSO Algorithm  Testing  Conclusions

slide-3
SLIDE 3

Introduction

 By using the FML intellectual decision tool to establish

the knowledge base and rule base of the fuzzy inference system; optimize the FML knowledge base and rule base through the methods of machine learning.

 Machine learning is executed by means of regression,

ensemble methods, and deep learning.

slide-4
SLIDE 4

Goal

 The goal of our project is to create a model used to predict the

final outcome of the election, an make those of the predicted results closer to the actual outcome of the election.

 To compare the difference of the two algorithms, GA and

PSO, and perform testing based on the results of the elections.

 Perform hard/software integration and utilize robotic

applications

slide-5
SLIDE 5

Machine Learning Process

Original data

Feature extraction Normalization

Training data

  • A. Prediction

model

  • B. Decision

model

Testing data

Machine learning

slide-6
SLIDE 6

FML Fuzzy Markup Language

slide-7
SLIDE 7

Establishment of FML-Based Knowledgebase

Input

PA(Power Area) AD(Age Distribution) PS(Poll Satisfaction) PE(Political Experience)

Output

ET(Election)

slide-8
SLIDE 8

PA(Power Area)

 Denotes the interdependence of the candidate’s strongholds and the electorate

since it enhances emotional identification

 A bonus points system is used  Three points is given when the candidate is born in the electorate  Two points is given when the candidate is born in a different place, but the

candidate’s spouse is born in the same place, and

 One point is given when there is no direct relativity between the candidate

and the electorate

slide-9
SLIDE 9

AD(Age Distribution)

 According to findings of recent elections, young votes

dramatically influence the final outcome; whereas older people would have a rather fixed political preference

 We used weighted mean to convert data to AD

 20-29 yrs. Old multiplied by 5  30-39yrs. Old multiplied by 4  40-49yrs. Old multiplied by 3  50-59yrs. Old multiplied by 3  Beyond 60yrs. Old multiplied by 3

slide-10
SLIDE 10

PS(Poll Satisfaction)

 The Credits/ Discredits will directly affect the votes received

by the candidate

 PS is calculated according to the average of the last

conducted poll survey

slide-11
SLIDE 11

PE(Political Experience)

 Denotes the political experience of the candidate since the

constituencies’ decisions are often based on the similar political experiences of the candidate

 A bonus points system is used

 Plus one point if worked as chief of village  Plus two points if worked as member of parliament or Members of the

Legislative Yuan

 Plus three points if worked as commissioner  Plus four points if worked as deputy mayor  Plus five points if worked as mayor of the city

slide-12
SLIDE 12

ET(Election)

 The actual votes received by the candidate

slide-13
SLIDE 13

KB and RB—KB Criteria (Before Learning)

 PA、AD

 Low:[0,0.1,0.3,0.4]  Medium:[0.3,0.4,0.6,0.7]  High:[0.6,0.7,0.9,1]

 PS

 Low:[0,0.1,0.2,0.3]  Medium_Low:[0.2,0.3,.4,0.5]  Medium_High:[0.4,0.5,0.7,0.8]  High:[0.7,0.8,0.9,1]

 PE

 Low:[0,0.2,0.4,0.6]  Medium_Low:[0.4,0.6,0.8,1]  Medium_High:[0.8,1,1.4,1.6]  High:[1.4,1.6,1.8,2]

 ET

 Low:[0,0.1,0.2,0.3]  Medium_Low:[0.2,0.3,0.4,0.5]  Medium:[0.4,0.5,0.6,0.7]  Medium_High:[0.6,0.7,0.8,0.9]  High:[0.8,0.9,1,1]

slide-14
SLIDE 14

Principle of Knowledge Base

slide-15
SLIDE 15

Figure of Knowledge Base(Before Learning)

slide-16
SLIDE 16

Rule Base

slide-17
SLIDE 17

Rule Base Diagram

slide-18
SLIDE 18

Selection and Normalization

 Selection:

We gathered data from numerous elections across Taiwan, and 66 of them became training data, and the rest of them became testing data(22).

Normalization:

PA/PE: Divide the whole column by 10. AD/PS/ET: Divide the whole column by 100 .

slide-19
SLIDE 19

Selection and Normalization

Orig. Aft.

slide-20
SLIDE 20

Input Output

Training Data and Testing Data

slide-21
SLIDE 21

FML Machine Learning—GA

 Using GA(Genetic Algorithm)  Establish the knowledge base and input the rule base  Using GA to perform machine learning(Training Data) and

receive an optimized model

 Perform testing(Testing Data)

slide-22
SLIDE 22

FML learning interface

slide-23
SLIDE 23

Genetic Learning Results

Generation

slide-24
SLIDE 24

Figure of KB (After GA Learning)

slide-25
SLIDE 25

Training Results

slide-26
SLIDE 26

FML Inference Interface

slide-27
SLIDE 27

Correlation Coefficient

 The correlation coefficient is a statistical measure of the strength of the

relationship between the relative movements of two variables. The values range between -1.0 and 1.0. A calculated number greater than 1.0 or less than - 1.0 means that there was an error in the correlation measurement. A correlation

  • f -1.0 shows a perfect negative correlation, while a correlation of 1.0 shows a

perfect positive correlation. A correlation of 0.0 shows no linear relationship between the movement of the two variables.

slide-28
SLIDE 28

Inference Results--By 10000 Generation Model

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65

Inference Data

ET ET aft.

correl 0.842571

slide-29
SLIDE 29

Inference Results--By 7000 Generation Model

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65

Inference Data

ET ET aft.

correl 0.898741

slide-30
SLIDE 30

Testing Results—Internal Test

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65

internal test

ET ET orig.

correl 0.850459

slide-31
SLIDE 31

Testing Results—External Test

No PA AD PS PE ET ET orig. 1 0.130556 0.152 0.4 0.4586 2 0.3 0.475556 0.58 0.5 0.409 0.5414 3 0.3 0.057778 0.05 0.4 0.1095 4 0.3 0.510556 0.47 1 0.523 0.4948 5 0.3 0.172222 0.19 0.6 0.255 0.3823 6 0.3 0.237222 0.27 0.4 0.274 0.382 7 0.3 0.155 0.09 0.2768 8 0.3 0.292778 0.31 0.4 0.274 0.3229 9 0.3 0.161667 0.15 0.4 0.272 0.1798 10 0.3 0.356111 0.4 1 0.348 0.4118 11 0.1 0.02 0.01 0.0128 12 0.3 0.292222 0.41 0.2 0.274 0.3956 13 0.1 0.049444 0.046 0.5 0.0255 14 0.3 0.343333 0.31 0.8 0.266 0.3704 15 0.3 0.005 0.013 0.0054 16 0.3 0.001 0.04 0.0083 17 0.3 0.411667 0.4 0.6 0.517 0.5905 18 0.1 0.606111 0.59 0.6 0.515 0.5653 19 0.1 0.158889 0.17 0.2 0.274 0.2762 20 0.1 0.095556 0.07 0.0549 21 0.3 0.462222 0.44 1.1 0.527 0.6309 22 0.3 0.145556 0.15 0.8 0.245 0.3409 correl 0.846211

0.1 0.2 0.3 0.4 0.5 0.6 0.7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

external test

ET ET orig.

slide-32
SLIDE 32

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1 2 3

2020 Election Testing

ET orig. ET aft.

ET orig. ET aft. 0.7003 0.7 0.0406 0.259 0.259 correl

0.99904716

2020 Kaohsiung Mayor Election Inference Data

slide-33
SLIDE 33

FML Machine Learning—PSO

 Using PSO(Particle swarm optimization)  Establish the knowledge base and input the rule base  Using PSO to perform machine learning(Training Data) and

receive an optimized model

 Perform testing(Testing Data)

slide-34
SLIDE 34

KB Diagram

slide-35
SLIDE 35
slide-36
SLIDE 36

RB Diagram

slide-37
SLIDE 37

PSO Algorithm for Testing Data(10G)

slide-38
SLIDE 38

PSO Algorithm for Testing Data(100G)

slide-39
SLIDE 39

KB Diagram(After learning)

slide-40
SLIDE 40
slide-41
SLIDE 41

Fuzzy Inference(PSO)

slide-42
SLIDE 42

Fitness/Accuracy

slide-43
SLIDE 43

2020 Kaohsiung Mayor Election Inference Data

slide-44
SLIDE 44

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 1 2 3

PSO Algorithm

ET orig. ET AFT

ET orig. ET AFT . 0.7003 0.50059873 0.0406 0.09172902 0.259 0.32717 CORREL 0.96105583

2020 Kaohsiung Mayor Election Inference Data

slide-45
SLIDE 45

Connection with Kebbi robot—Blockly

Input the variables for Kebbi

slide-46
SLIDE 46

The Kebbi AI bot will vocally tell us the output

slide-47
SLIDE 47

Comparison Between GA and PSO

 Compare GA and PSO

 A curvature design is shown in the KB diagram of GA, but

PSO doesn’t have this function up to now. And GA is also better since it shows a fuzzy concept during learning and inference

 PSO has a colored design in the KB diagram which is

friendlier to new starters

 After Fuzzy inference or fitness/accuracy calculations,

PSO directly indicates the corresponding level, therefore it’s easier to use speaking of this function.

slide-48
SLIDE 48

Conclusion

 According to the Internet, we could get reliable data

and therefore predict the final results of the election

 After comparing GA and PSO algorithm, we found that

PSO is more suitable for new starters; however, speaking of performance and accuracy, GA is better.

 Correlation is found within the two lists of testing

results which is further quantified by the correlation coefficient

 The isn’t always a relation between accuracy and

generations

slide-49
SLIDE 49

Future Outlook

 We found that there are still many variables that effects the

  • utcome of the election, although the results of this FML system is
  • utstanding, we want to add the factor of different political parties

 We hope that we can make FML accessible for everyone, and can

be used to predict what they wanted to know anywhere anytime.

 What we did so far is just the mayor election, and we hope we

could predict presidential elections and even foreign elections.

 We found that FML could be easily used and applied to everyday-

life, and we hope that we could develop a model that benefits our society.

slide-50
SLIDE 50

Thank You For Your Attention