Machine Learning Lecture Notes PDF
Document Details
Uploaded by BestPerformingCarolingianArt
Menoufia National University
Dr. Amira Abdelatey
Tags
Summary
These lecture notes cover various aspects of machine learning, including different types of learning (supervised and unsupervised), applications, advantages, disadvantages, and examples. The document includes details on steps involved in machine learning and examples of data for loan applications and classifications.
Full Transcript
Machine Learning Dr. Amira Abdelatey Outlines Machine learning Applications of Machine Learning Steps in ML Advantages and dis advantages of ML Types of ML: Regression Supervised ML Unsupervised ML Machine Learning vs Deep Learning What is Machine Lear...
Machine Learning Dr. Amira Abdelatey Outlines Machine learning Applications of Machine Learning Steps in ML Advantages and dis advantages of ML Types of ML: Regression Supervised ML Unsupervised ML Machine Learning vs Deep Learning What is Machine Learning? Machine Learning is the study of methods for programming computers to learn. Building machines that automatically learn from experience. Machine learning usually refers to the changes in systems that perform tasks associated with artificial intelligence AI Such tasks involve recognition, diagnosis, planning, robot control, prediction, etc. 3 What is Machine Learning? Learning Trained algorithm machine TRAINING DATA Answer Query 4 An example: data (loan application) Approved or not 5 Label Traditional programming vs machine learning Applications Image Recognition Speech Recognition Recommender Systems Fraud Detection Self Driving Cars Medical Diagnosis Stock Market Trading Steps in machine learning 1) Data collection. 2) Representation. 3) Modeling. (Machine Learning modeling) 4) Validation. 5) Apply learned model to new “test” data 8 8 Advantages of ML 1) Solving vision problems through statistical inference. 2) Intelligence from the common sense AI. 3) Reducing the constraints over time achieving complete autonomy. 9 9 Disadvantages of ML 1) Application specific algorithms. 2) Real world problems have too many variables and sensors might be too noisy. 3) Computational complexity. 10 10 Types of Learning Supervised learning – Given: training data + desired outputs (labels) Unsupervised learning – Given: training data (without desired outputs) What is Supervised Learning? Dataset CAR CAR + BIKE = Training Dataset BIKE Samples Labels [In supervised learning, we need some thing called a Labelled Training Dataset ] 12 What is Supervised Learning? Dataset a new sample CAR CAR + BIKE = Training Dataset 𝑓( , )= CAR BIKE Sample Labels s [ Given a labelled dataset, the task is to devise a function which takes the dataset, and a new sample, and produces an output value.] 15 Classifier example Elephant Elephant Classifier Tiger Identify the Animal ? Dataset Classification classify the categorical or discrete variables. 18 Supervised Learning: Classification Given (x1, y1), (x2, y2),..., (xn, yn) Learn a function f(x) to predict y given x y is categorical == classification Supervised Learning: Classification Given (x1, y1), (x2, y2),..., (xn, yn) Learn a function f(x) to predict y given x y is categorical or discrete == classification Classify New sample Linear regression Linear regression is also a type of a supervised machine-learning algorithm that learns from the labelled datasets It predicts the continuous output variables Supervised Learning: Regression Given (x1, y1), (x2, y2),..., (xn, yn) Learn a function f(x) to predict y given x y is real-valued == regression What is Unsupervised Learning CAR CAR BIKE BIKE Dataset [ In the unsupervised learning, we do not need to know the labels or Ground truth values ] 25 What is Unsupervised Learning Clustering Dataset [ The task is to identify the patterns like group the similar objects together ] 26 More Example Unsupervised Learning Dataset 27 More Example Unsupervised Learning Dataset 28 Unsupervised: Clustering Unsupervised Learning Given x1, x2,..., xn (without labels) Output hidden structure behind the x’s E.g., clustering Try Learning from the following dataset? Is classification or clustering? Supervised Machine Learning application A credit card company receives thousands of applications for new cards. Each application contains information about an applicant, – age – Marital status – annual salary – outstanding debts – credit rating – etc. Problem: to decide whether an application should approved, or to classify applications into two categories, approved and not approved. 34 Machine learning and our focus Like human learning from past experiences. A computer does not have “experiences”. A computer system learns from data, which represent some “past experiences” of an application domain. Our focus: learn a target function that can be used to predict the values of a discrete class attribute, e.g., approve or not-approved, and high-risk or low risk. The task is commonly called: Supervised learning, classification, or inductive learning. 35 The data and the goal Data: A set of data records (also called examples, instances or cases) described by – k attributes: A1, A2, … Ak. – a class: Each example is labelled with a pre- defined class. Goal: To learn a classification model from the data that can be used to predict the classes of new (future, or test) cases/instances. 36 An example: data (loan application) Approved or not 37 An example: the learning task Learn a classification model from the data Use the model to classify future loan applications into – Yes (approved) and – No (not approved) What is the class for following case/instance? 38 Supervised vs. unsupervised Learning Supervised learning: classification is seen as supervised learning from examples. – Supervision: The data (observations, measurements, etc.) are labeled with pre-defined classes. It is like that a “teacher” gives the classes (supervision). – Test data are classified into these classes too. Unsupervised learning (clustering) – Class labels of the data are unknown – Given a set of data, the task is to establish the existence of classes or clusters in the data 39 Supervised learning process: two steps ◼ Learning (training): Learn a model using the training data ◼ Testing: Test the model using unseen test data to assess the model accuracy Number of correct classifications Accuracy = , Total number of test cases 40