Basic_Introduction_of_Machine_Learning for undergraduate

ssuser36b130 29 views 56 slides Aug 29, 2024
Slide 1
Slide 1 of 56
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56

About This Presentation

Machine Learning


Slide Content

Course Overview Machine Learning Image source: https://goo.gl/EhqEpf

Artificial Intelligence The term ‘Artificial Intelligence (AI)’ was first coined by John McCarthy in 1956. AI is the science and engineering of making intelligent machines. (John McCarthy) 2 NIT Agartala

Early AI Systems IBM’s Deep Blue Chess playing machine Defeated world champion Garry Kasparov in 1997. Chess is a simple world: 64 locations and 32 pieces. Moves can be described by formal rules. NIT Agartala 3 Image source: https://bit.ly/37UcuTe

Early AI Systems Knowledge based systems hard-code knowledge about the world in formal languages. A computer can reason about statements in these formal languages automatically using logical inference rules. Cyc (Douglas Lenat , 1984. Now, it is https://cyc.com ) “ FredWhileShaving ”: Is Fred still a person while shaving? 4 Fred A person Razor A device Does a person have electrical parts? Is Fred still a person while shaving? Cyc failed to understand the story: A person Fred is shaving in the morning. What is shaving? What does the entity “ FredWhileShaving ” mean? Fred is shaving NIT Agartala

Machine Learning: Historical Perspective Arthur Samuel in 1959, a computer scientist at IBM, first coined the term Machine Learning. Tom M. Mitchell formally defined Machine Learning in 1997 in his book. 5 NIT Agartala

Why Machine Learning? The difficulties faced by systems relying on hard-coded knowledge suggest that AI systems need the ability to acquire their own knowledge , by extracting patterns from raw data. Machine Learning has such capabilities of acquiring knowledge by extracting patterns from the data. Introduction of machine learning allowed computers to tackle problems involving knowledge of the real world and make decisions that appear subjective. Representation learning : The performance of the machine learning algorithms depends heavily on the representation ( feature ) of the data they are given. The choice of representation has an enormous effect on the performance of machine learning algorithms. 6 NIT Agartala

Representation Learning Some data is plot using cartesian coordinates to separate the categories of data: impossible task . Some data is plot using polar coordinates to separate the categories of data: solvable with a simple vertical line . 7 y x x y Cartesian coordinates Polar coordinates NIT Agartala

Representation Learning Some data is plot using cartesian coordinates to separate the categories of data: impossible task . Some data is plot using polar coordinates to separate the categories of data: solvable with a simple vertical line . 8 y x x y Cartesian coordinates Polar coordinates NIT Agartala

Representation Learning Some data is plot using cartesian coordinates to separate the categories of data: impossible task . Some data is plot using polar coordinates to separate the categories of data: solvable with a simple vertical line . 9 y x x y Cartesian coordinates Polar coordinates NIT Agartala

Representation Learning Some data is plot using cartesian coordinates to separate the categories of data: impossible task . Some data is plot using polar coordinates to separate the categories of data: solvable with a simple vertical line . 10 y x x y Cartesian coordinates Polar coordinates Many AI tasks can be solved by extracting the right set of features. But selecting the features is difficult. NIT Agartala

Representation Learning We want do detect cars from images. A possible feature: wheels . Problem: In terms of pixels, how do we define a wheel? Every image of a wheel may not be good. Representation Learning: Let machine learning to discover not only the mapping from representation to output but also the representation itself . Learned representations often result in much better performance than can be obtained with hand-designed representations. 11 Image source: https://bit.ly/3jQAqfP Image source: https://bit.ly/3CTVeMn NIT Agartala Good image Wheels not properly captured

Representation Learning Factors of variation: They are often not quantities that are directly observed. They may also exist as constructs in the human mind that provide useful simplifying explanations or inferred causes of the observed data. Speech analysis: speaker’s age, gender, accent etc. RL through Deep learning: Each layer learns some features. 12 Image source: Deep Learning Book at https://www.deeplearningbook.org/contents/intro.html NIT Agartala

AI and Machine Learning 13 NIT Agartala

AI and Representation Learning Flowcharts showing how the different parts of an AI system relate to each other within different AI disciplines. Shaded boxes indicate components that are able to learn from data. 14 NIT Agartala

AI and Representation Learning Flowcharts showing how the different parts of an AI system relate to each other within different AI disciplines. Shaded boxes indicate components that are able to learn from data. 15 NIT Agartala

AI and Representation Learning Flowcharts showing how the different parts of an AI system relate to each other within different AI disciplines. Shaded boxes indicate components that are able to learn from data. 16 NIT Agartala

AI and Representation Learning Flowcharts showing how the different parts of an AI system relate to each other within different AI disciplines. Shaded boxes indicate components that are able to learn from data. 17 NIT Agartala

Why AI and Machine Learning? 18 Evolution of the World Wide Web (www) Image source: https://bit.ly/3yLlTbB NIT Agartala

Why AI and Machine Learning? 19 Evolution of Social Media Image source: https://bit.ly/3lYwJaF NIT Agartala

Why AI and Machine Learning? 20 Internet of Things (IoT) Image source: https://bit.ly/37EOfs2 NIT Agartala

Why AI and Machine Learning? 21 Explosion of data size Today the digital word is using Yottabytes of data. Image recreated from https://bit.ly/37LUf24 10 27 10 24 10 21 10 18 10 15 10 12 10 9 10 6 Brontobyte This will be our future digital universe Zettabyte 1.2 ZB of network traffic in 2016 according to Cisco Yottabyte This is our digital universe today = 250 trillion DVDs Exabyte 1EB of data is created on the internet everyday = 250 million DVDs worth of information Petabyte The CERN Hadron Collider generates 1 PB per second Terabyte 500 TB of data per day are ingested in Facebook databases Gigabyte Megabyte NIT Agartala

Big Data Widespread use of personal computers and wireless communication leads to “big data” We are both producers and consumers of data Data is not random, it has structure, e.g., customer behavior We need “big theory” to extract that structure from data for (a) Understanding the process (b) Making predictions for the future 22 NIT Agartala

Why “Learn” ? Machine learning is programming computers to optimize a performance criterion using example data or past experience. There is no need to “learn” to calculate payroll Learning is used when: Human expertise does not exist (navigating on Mars), Humans are unable to explain their expertise (speech recognition) Solution changes in time (routing on a computer network) Solution needs to be adapted to particular cases (user biometrics) 23 NIT Agartala

What We Talk About When We Talk About “Learning” Learning general models from a data of particular examples Data is cheap and abundant (data warehouses, data marts); knowledge is expensive and scarce. Example in retail: Customer transactions to consumer behavior: People who bought “ Laptop ” also bought “ Printer ” (www.amazon.com) Build a model that is a good and useful approximation to the data. 24 NIT Agartala

Data Mining Retail: Market basket analysis, Customer relationship management (CRM) Finance: Credit scoring, fraud detection , Stocks prediction Manufacturing: Control, robotics, troubleshooting Medicine: Medical diagnosis Telecommunications: Spam filters, intrusion detection Bioinformatics: Motifs, alignment Web mining: Search engines Entertainment : Movie ratings and recommendations, Game play analysis 25 NIT Agartala

What is Machine Learning? “ A computer program is said to learn from experience E with respect to some class of tasks T , and performance measure P , if its performance at tasks in T , as measured by P , improves with experience E . ” -Tom Mitchell Thus, there are many kinds of machine learning, depending on : the nature of the task T we wish the system to learn, the nature of the performance measure P we use to evaluate the system, and the nature of the training signal or experience E we give it. 26 NIT Agartala

Role of Statistics & Computer Science in ML Optimize a performance criterion using example data or past experience. Role of Statistics: Inference from a sample Role of Computer science: Efficient algorithms to Solve the optimization problem Representing and evaluating the model for inference 27 NIT Agartala

Types of Machine Learning 28 NIT Agartala

29 Input (X) Output (Y) Application email spam (0/1) Spam Filtering audio text transcript Speech Recognition English Hindi Machine Translation ad,user info click? (0/1) Online advertising image, rader info Postion of the cars self-driving car image of phone defect? (0/1) Visual Inspection

Supervised Learning h is a function to map h(x) →y for all x in X   Training Set Learning Algorithm Hypothesis h Input X Predicted Y 30

Supervised Learning: Overview NIT Agartala 31 Data with labels Fit the model Train the data with a ML algorithm Trained Model Data without labels Predict Predicted Answers Trained Model Training Testing

Types of Supervised Learning NIT Agartala 32 Supervised Learning Classification Regression Outcome is continuous ( numeric ). Examples: Predicting the gross earnings of a movie. Predicting profit and loss. Outcome is a category . Examples: Predicting whether a movie will win Oscars or not. Identifying objects from an image.

Classification: Applications Aka Pattern recognition Face recognition: Pose, lighting, occlusion (glasses, beard), make-up, hair style Character recognition: Different handwriting styles. Speech recognition: Temporal dependency. Medical diagnosis: From symptoms to illnesses Biometrics: Recognition/authentication using physical and/or behavioral characteristics: Face, iris, signature, etc Outlier/novelty detection: 33 NIT Agartala

Unsupervised Learning Unsupervised learning ( clustering ): The class labels of training data are unknown. Given a set of observations or measurements, establish the possible existence of classes or clusters in the data. NIT Agartala 34

Applications of Unsupervised Learning Customer segmentation Document clustering Gene clustering Outlier detection Social network analysis Followers Influencers Males vs. females NIT Agartala 35 Image source: https://bit.ly/3xMM0xp Graph of a user’s Facebook network

Reinforcement Learning NIT Agartala 36 Scenario 1: Baby starts crawling and walks to the candy

Reinforcement Learning NIT Agartala 37 Scenario 1: Baby starts crawling and walks to the candy. Candies are the rewards for the baby.

Reinforcement Learning NIT Agartala 38 Scenario 1: Baby starts crawling and walks to the candy. Candies are the rewards for the baby.

Reinforcement Learning NIT Agartala 39 Scenario 1: Baby starts crawling and walks to the candy. Candies are the rewards for the baby. Since reaching the candy is the goal, the baby is happy to be rewarded.

Reinforcement Learning NIT Agartala 40 Scenario 2: Baby starts crawling but gets an obstruction on his way.

Reinforcement Learning NIT Agartala 41 Scenario 2: Baby starts crawling but gets an obstruction on his way. The baby is hurt as he got a negative reward and starts crying.

Reinforcement Learning Unlike the other two learning frameworks (supervised and unsupervised), which operate using a static dataset, RL works with data from a dynamic environment. And the goal is not to cluster data or label data, but to find the best sequence of actions that will generate the optimal outcome. The way reinforcement learning solves this problem is by allowing a piece of software called an agent to explore, interact with, and learn from the environment. 42

Reinforcement Learning Unlike the other two learning frameworks (supervised and unsupervised), which operate using a static dataset , RL works with data from a dynamic environment . And the goal is not to cluster data or label data, but to find the best sequence of actions that will generate the optimal outcome. The way reinforcement learning solves this problem is by allowing a piece of software called an agent to explore, interact with, and learn from the environment. 43

Reinforcement Learning Unlike the other two learning frameworks (supervised and unsupervised), which operate using a static dataset , RL works with data from a dynamic environment . And the goal is not to cluster data or label data, but to find the best sequence of actions that will generate the optimal outcome. The way reinforcement learning solves this problem is by allowing a piece of software called an agent to explore, interact with, and learn from the environment. 44

Reinforcement Learning Unlike the other two learning frameworks (supervised and unsupervised), which operate using a static dataset , RL works with data from a dynamic environment . And the goal is not to cluster data or label data, but to find the best sequence of actions that will generate the optimal outcome. The way reinforcement learning solves this problem is by allowing a piece of software called an agent to explore, interact with, and learn from the environment. 45

Reinforcement Learning Two major components in RL: Agent: The baby Environment: The room 46 Agent Environment

Reinforcement Learning Agent: the baby is the agent Environment: the room State: Given by the environment 47 Agent Environment State  

Reinforcement Learning Agent: the baby is the agent Environment: the room State: Given by the environment Action: In turn, the agent takes an action 48 Agent Environment State   Action  

Reinforcement Learning Agent: the baby is the agent Environment: the room State: Given by the environment Action: In turn, the agent takes an action Reward: The agent is rewarded by the environment based on the action 49 Agent Environment State   Action   Reward  

Reinforcement Learning Agent: the baby is the agent Environment: the room State: Given by the environment Action: In turn, the agent takes an action Reward: The agent is rewarded by the environment based on the action Next state: Based on the previous action, the agent will move to the next state provided by the environment. This loop of action->reward->action will continue until the environment gives back a terminal state. 50 Agent Environment State   Action   Reward   Next state  

Applications of Reinforcement Learning Self-driven cars NIT Agartala 51 Financial trading Industrial automation Deepmind’s AI based cooling system for Google Data Center. https://bit.ly/3sfDgyG Whether to buy or sell stocks.

Course Prerequisites Programming Python for assignments Calculus Simple integrals, partial derivatives Linear Algebra Matrix factorization, eigen values Probability Discrete and continuous 52 NIT Agartala

Resources: Datasets UCI Repository: http://www.ics.uci.edu/~mlearn/MLRepository.html Statlib: http://lib.stat.cmu.edu/ Other datasets 53 NIT Agartala

Resources: Journals Journal of Machine Learning Research www.jmlr.org Machine Learning Neural Computation Neural Networks IEEE Trans on Neural Networks and Learning Systems IEEE Trans on Pattern Analysis and Machine Intelligence Journals on Statistics/Data Mining/Signal Processing/Natural Language Processing/Bioinformatics/... 54 NIT Agartala

Resources: Conferences International Conference on Machine Learning (ICML) European Conference on Machine Learning (ECML) Neural Information Processing Systems (NIPS) Uncertainty in Artificial Intelligence (UAI) Computational Learning Theory (COLT) International Conference on Artificial Neural Networks (ICANN) International Conference on AI & Statistics (AISTATS) International Conference on Pattern Recognition (ICPR) ... 55 NIT Agartala

Books and References 56 MACHINE LEARNING 1 st edition TOM MITCHELL © McGraw Hill , 1997 http://www.cs.cmu.edu/afs/cs.cmu.edu/user/mitchell/ftp/mlbook.html MACHINE LEARNING COURSE BY ANDREW NG © Coursera YouTube link: https://bit.ly/3jSLVU6 INTRODUCTION TO MACHINE LEARNING 3 rd edition E THEM ALPAYDIN © The MIT Press, 2014 [email protected] http://www.cmpe.boun.edu.tr/~ethem/i2ml3e NIT Agartala