0% found this document useful (0 votes)
11 views

L1 ML Fundamentals

Uploaded by

Fahim Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

L1 ML Fundamentals

Uploaded by

Fahim Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Fundamentals of Machine Learning

Course 4232: Machine Learning

Dept. of Computer Science


Faculty of Science and Technology

Lecturer No: 1 Week 1 (1X1.5 hrs) Semester: Summer 21-22


No:
Instructor: Dr. M M Manjurul Islam ([email protected])
Vision & Mission of AIUB

VISION
AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB)
envisions promoting professionals and excellent leadership catering to the
technological progress and development needs of the country.

MISSION
AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB) is
committed to provide quality and excellent computer-based academic
programs responsive to the emerging challenges of the time. It is dedicated to
nurture and produce competent world class professional imbued with strong
sense of ethical values ready to face the competitive world of arts, business,
science, social science and technology.

2
Goals of AIUB
Sustain development and progress of the university
Continue to upgrade educational services and facilities responsive of the
demands for change and needs of the society
Inculcate professional culture among management, faculty and personnel in the
attainment of the institution's vision, mission and goals
Enhance research consciousness in discovering new dimensions for curriculum
development and enrichment

Implement meaningful and relevant community outreach programs reflective of


the available resources and expertise of the university

Establish strong networking of programs, sharing of resources and expertise


with local and international educational institutions and organizations

Accelerate the participation of alumni, students and professionals in the


implementation of educational programs and development of projects designed
to expand and improve global academic standards
3
Vision & Mission of
Computer Science Department

VISION
Provides leadership in the pursuit of quality and excellent computer
education and produce highly skilled and globally competitive IT
professionals.
MISSION

Committed to educate students to think analytically and communicate


effectively; train them to acquire technological, industry and research-oriented
accepted skills; keep them abreast of the new trends and progress in the
world of information communication technology; and inculcate in them the
value of professional ethics.

4
Goals of Computer Science Department

Enrich the computer education curriculum to suit the needs of the industry-
wide standards for both domestic and international markets

Equip the faculty and staff with professional, modern technological and
research skills
Upgrade continuously computer hardware's, facilities and instructional
materials to cope with the challenges of the information technology age
Initiate and conduct relevant research, software development and outreach
services.
Establish linkage with industry and other IT-based organizations/institutions
for sharing of resources and expertise, and better job opportunities for
students

5
Course Evaluation
Assessment Type Marks Term
Attendance 10%
Quiz (Best one of two) 30%
Project 01 20% Mid Term (40%)
Term Assessment 40%
Total 100%

Attendance 10%
Quiz (Best one of two) 30%
Final Term (60%)
Term Assessment/Project 02 60%
Total 100%
Semester Total 100%

6
Classroom Policies

Must be present inside the class in due time.


Class Break: I would prefer to start the class in due time and leave the class in 10/15 minutes
early for theory/Laboratory class respectively, instead of giving a break.
Every class will start with a question-answer session about the last lecture. So students must be
prepared with the contents and exercises from the last lecture.
Students are suggested to ask questions during or after the lecture.
Additional/bonus marks may be given to any good performances during the class.

Late in Class:
Student coming after 10 minutes of due time is considered late.
3 late attendances are considered as one absent.
Late during quiz/presentation are not given additional time.
Students who are regularly late might have additional deduction of marks.
A late student will be allowed to enter the class. Don’t ask permission to enter the class,
just get in slowly and silently. Same policy implies if a student wants to go out of the class
for emergency reasons.

7
Attendance
At least 80% presence is required by the student. Absent classes must
be defended by the student through application and proper
documentation to the course teacher.

Single absences or absences within 25% range will be judged by the


course teacher.

Long absences/irregular presence/absences out of 25% range must go


through application procedures via department Head (+ probation
office, if student is in probation) to attend the following classes.

Acceptance of an application for absence only gives permission to


attend the following classes. This might still result in deduction of marks
(for attendance) which will be judged by the course teacher.

8
Makeup Evaluation
◼ There will be no makeup quiz if a student have appeared in 2 quizzes.
◼ Makeup for missing evaluations like quizzes/assignment submission
date/presentation date/viva date/etc., must go through valid application
procedure with supporting document within the deadline of the actual
evaluation date.
◼ Makeup for missing Midterm/Final term must go through Set B form along
with the supporting document within the 1st working day after exam week.
The set B exam is generally scheduled from the 2nd working day after the
exam week. Must get signature and exam date from the course teacher
and get it approved by the department Head (monetary penalty might be
imposed).
◼ Students unable to attend the set B exam may apply for set C exam within
the same time limit as set B. Such applications must be supported by very
strong reason and documentation, as they are generally rejected.
◼ The course teacher will be the judge of accepting/rejecting the request for
makeup.
9
Grading Policies
◼ All the evaluation categories & marks will be uploaded to the VUES
within one week of the evaluation process except the attendance &
performance, which will be uploaded along with the major (mid/final
term) written exam marks.
◼ Letter grades ‘A+’ through ‘F’ is counted as grades. Other grades ‘I’
and ‘UW’ are considered as temporary grades which are
counted/calculated as ‘F’ grade in the CGPA. These grades
must/will be converted to the actual grades, i.e. ‘A+’ through ‘F’.
◼ ‘I: INCOMPLETE’ is given to students who have missed at most
30% of evaluation categories (quiz/assignment/etc.). Students must
contact the course teacher for makeup, through valid application
procedures immediately after grade release.
◼ ‘UW: UNOFFICIAL WITHDRAW’ is given when the missing
evaluation categories are too high (more than 30%) to makeup. A
student getting ‘UW’ has no option but to drop the course
immediately after grade release
10
Dropping the course
◼ Must fill up the drop form and get it signed by the course
teacher, write an application to the Head of Dept. and
get it signed by the department Head, and finally submit
the form & application to the registration department.
◼ The course teacher must write down the grades (if any)
obtained in midterm, final, and grand total on the drop
form.
◼ No drop is accepted during exam week.
◼ Student with ‘F’ grades in midterm, final term, or grand
total cannot drop.

11
Finally
◼ For any missing evaluation (quiz, assignment, etc.), classes,
deadlines, etc. must contact/inform/notify the teacher immediately
after missing in the consulting hour, via email, or in unavoidable
circumstances – through the guardian or friend.

◼ Any kind of dishonesty, plagiarism, misbehavior, misconduct, etc.


will not be tolerated. Might result in deduction of marks, ‘F’ grade, or
reported to the AIUB Disciplinary Committee for drastic punishment.

◼ Always check/visit the AIUB home page for notices, rules &
regulations of academic/university policies and important
announcement for deadlines (Course drop, Exam permit, Exam
Schedule, etc.).

12
Course Prerequisite

◼ CSC4121: Artificial Intelligence & Expert System

13
Course Objective
❑ This module introduces basic concepts and algorithms in machine
learning and neural networks.

❑ The main reason for studying computational learning is to make


better use of powerful computers to learn knowledge (or
regularities) from the raw data.

❑ The ultimate objective is to build self-learning systems to relieve


human from some of already-too many programming tasks.

❑ At the end of the course, students are expected to be familiar with


the theories and paradigms of computational learning, and capable
of implementing basic learning systems.

14
Course Objective
• This course provides a broad introduction to machine learning. Topics include:

• (i) Supervised learning (parametric/non-parametric algorithms, support vector


machines, kernels, neural networks). (ii) Unsupervised learning (clustering,
dimensionality reduction, deep learning). (iii) Best practices in machine
learning (bias/variance theory; innovation process in machine learning and AI).

• This course will also look into a variety of artificial neural networks in terms of
architectures and learning algorithms and discuss as many successful real-world
applications as possible.

• Fundamental concepts and tools underlying machine learning and hands-on


experience with implementation of some machine learning algorithms applied
to real world cases.

• Research issues as well as machine learning strategies and issues relating


specific industrial sectors.
15
Importance of the course
Studying ML/AI opens a world of opportunities.

At a basic level, you’ll better understand the systems and tools that you
interact with daily. And if you stick with the subject and study more, you
can help create cutting edge ML/AI applications, like the Google Self
Driving Car, or IBM’s Watson.

In the field of artificial intelligence, the possibilities are truly endless.

Studying ML/AI now can prepare you for a job as a researching neural
networks, human-machine interfaces, and quantum artificial intelligence.

Or you could work as a software engineer in industry working for


companies like Amazon to shopping list recommendation engines or
Facebook analyzing and processing big data.

You could also work as a hardware engineer developing electronic


parking assistants or home assistant robots.
16
Topics to be Covered
◼ Mission & Vision of AIUB, Introduction to Machine Learning
◼ Supervised Learning Setup
◼ Regression
◼ Bayesian Decision Theory
◼ Parametric Methods
◼ Instance Based Learning
◼ Support Vector Machines
◼ Neural Networks, Perceptron
◼ Committee Machine Learner
◼ Deep Learning
◼ Unsupervised Setting
◼ Clustering
◼ Reinforcement Learning
◼ Review Topics

17
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)

18
Why learn?

◼ Build software agents that can adapt to their users or to other


software agents or to changing environments
 Personalized news or mail filter
 Personalized tutoring
 Mars robot

◼ Develop systems that are too difficult/expensive to construct


manually because they require specific detailed skills or
knowledge tuned to a specific task
 Large, complex AI systems cannot be completely derived by hand
and require dynamic updating to incorporate new information.

◼ Discover new things or structure that were previously unknown to


humans
 Examples: data mining, scientific discovery
19
Related Disciplines
The following are close disciplines:
 Artificial Intelligence
◼ Machine learning deals with the learning part of AI
 Pattern Recognition
◼ Concentrates more on “tools” rather than theory
 Data Mining
◼ More specific about discovery

The following are useful in machine learning techniques or may give


insights:
 Probability and Statistics
 Information theory

 Psychology (developmental, cognitive)


 Neurobiology
 Linguistics
 Philosophy
20
Data Mining
◼ Retail: Market basket analysis, Customer relationship
management (CRM)
◼ Finance: Credit scoring, fraud detection
◼ Manufacturing: Control, robotics, troubleshooting
◼ Medicine: Medical diagnosis
◼ Telecommunications: Spam filters, intrusion detection
◼ Bioinformatics: Motifs, alignment
◼ Web mining: Search engines
◼ ...

21
What is learning?

◼ “Learning is any process by which a system improves


performance from experience.” –Herbert Simon

◼ “Learning is constructing or modifying representations of


what is being experienced.”
–Ryszard Michalski

◼ “Learning is making useful changes in our minds.” –


Marvin Minsky

22
23
History of Machine Learning
◼ 1950s
 Samuel’s checker player
◼ 1960s:
 Neural networks: Perceptron
 Minsky and Papert prove limitations of Perceptron
◼ 1970s:
 Expert systems and the knowledge acquisition bottleneck
 Mathematical discovery with AM
 Symbolic concept induction

24
History of Machine Learning (cont.)
◼ 1980s:
 Resurgence of neural networks (connectionism,
backpropagation)
 Advanced decision tree and rule learning
 Learning, planning and problem solving
 Utility theory
 Analogy

◼ 1990s
 Data mining
 Reinforcement learning (RL)
 Inductive Logic Programming (ILP)
 Ensembles: Bagging, Boosting, and Stacking

25
History of Machine Learning (cont.)
◼ 2000s
 Kernel methods
◼ Support vector machines
 Graphical models
 Statistical relational learning
 Transfer learning

◼ Applications
 Adaptive software agents and web applications
 Learning in robotics and vision
 E-mail management (spam detection)
 …

26
What Is Machine Learning (ML)?

27
What is Machine Learning ?
 A computer program M is said to learn from experience E with respect to
some class of tasks T and performance P, if its performance as measured by
P on tasks in T in an environment Z improves with experience E.

 Example:
 T: Cancer diagnosis
 E: A set of diagnosed cases
 P: Accuracy of diagnosis on new cases
 Z: Noisy measurements, occasionally misdiagnosed training cases
 M: A program that runs on a general purpose computer; the learner

28
Dr. M M Manjurul Islam
What is Machine Learning ?
 A computer program M is said to learn from experience E with respect to
some class of tasks T and performance P, if its performance as measured by
P on tasks in T in an environment Z improves with experience E.

29
Dr. M M Manjurul Islam
Why Machine Learning ?
 Solving tasks that required a system to be adaptive
 Speech, face, or handwriting recognition
 Environment changes over time

 Understanding human and animal learning


 How do we learn a new language ? Recognize people ?
 Some task are best shown by demonstration
 Driving a car, or, landing an airplane

 Objective of Real Artificial Intelligence:


 “If an intelligent system–brilliantly designed, engineered and
implemented– cannot learn not to repeat its mistakes, it is not as
30
intelligent as a worm or a sea anemone or a kitten.” (Oliver Selfridge)
Dr. M M Manjurul Islam
31
Kinds of Learning
 Based on the information available
 Association
 Supervised Learning
 Classification
 Regression
 Reinforcement Learning
 Unsupervised Learning
 Semi-supervised learning

 Based on the role of the learner


 Passive Learning
 Active Learning
32
Dr. M M Manjurul Islam
Major paradigms of machine learning
◼ Rote learning – “Learning by memorization.”
 Employed by first machine learning systems, in 1950s
◼ Samuel’s Checkers program

◼ Supervised learning – Use specific examples to reach general conclusions or extract


general rules
◼ Classification (Concept learning)
◼ Regression

◼ Unsupervised learning (Clustering) – Unsupervised identification of natural groups in


data

◼ Reinforcement learning– Feedback (positive or negative reward) given at the end of a


sequence of steps

◼ Analogy – Determine correspondence between two different representations

◼ Discovery – Unsupervised, specific goal not given

◼ …

33
Rote Learning is Limited
◼ Memorize I/O pairs and perform exact matching with
new inputs

◼ If a computer has not seen the precise case before, it


cannot apply its experience

◼ We want computers to “generalize” from prior experience


 Generalization is the most important factor in learning

34
The inductive learning problem
◼ Extrapolate from a given set of examples to make
accurate predictions about future examples

◼ Supervised versus unsupervised learning


 Learn an unknown function f(X) = Y, where X is an input
example and Y is the desired output.
 Supervised learning implies we are given a training set of
(X, Y) pairs by a “teacher”
 Unsupervised learning means we are only given the Xs.
 Semi-supervised learning: mostly unlabelled data

35
Learning Associations
◼ Basket analysis:
P (Y | X ) probability that somebody who buys X also
buys Y where X and Y are products/services.

Example: P ( chips | beer ) = 0.7

36
Types of supervised learning
x2=color

Tangerines Oranges
a) Classification:
• We are given the label of the training objects: {(x1,x2,y=T/O)}

• We are interested in classifying future objects: (x1’,x2’) with


the correct label.
I.e. Find y’ for given (x1’,x2’).

x1=size

Tangerines Not Tangerines b) Concept Learning:

• We are given positive and negative samples for the concept


we want to learn (e.g.Tangerine): {(x1,x2,y=+/-)}

• We are interested in classifying future objects as member of


the class (or positive example for the concept) or not.
I.e. Answer +/- for given (x1’,x2’).

37
Types of Supervised Learning
◼ Regression
 Target function is continuous rather
than class membership
 For example, you have some the
selling prices of houses as their sizes
y=price
(sq-mt) changes in a particular location
that may look like this. You may
hypothesize that the prices are
governed by a particular function f(x)
f(x). Once you have this function that
“explains” this relationship, you can
guess a given house’s value, given its
sq-mt. The learning here is the
selection of this function f() . Note 60 70 90 120 150 x=size
that the problem is more meaningful
and challenging if you imagine several
input parameters, resulting in a multi-
dimensional input space. 38
Supervised Learning
 Training experience: a set of labeled examples of the form
< x1, x2, …, xn, y >

 where xj are values for input variables and y is the output

 This implies the existence of a “teacher” who knows the right answers

 What to learn: A function f : X1 × X2 × … × Xn → Y , which maps


the input variables into the output domain

39 Goal: minimize the error (loss function) on the test examples
Classification

◼ Example: Credit
scoring
◼ Differentiating
between low-risk
and high-risk
customers from their
income and savings

Discriminant: IF income > θ1 AND savings > θ2


THEN low-risk ELSE high-risk

40
Classification: Applications
 Pattern Recognition

 Face recognition: Pose, lighting, occlusion (glasses, beard), make-up, hair


style

 Character recognition: Different handwriting styles.

 Speech recognition: Temporal dependency.


 Use of a dictionary or the syntax of the language.
 Sensor fusion: Combine multiple modalities; eg, visual (lip image) and acoustic
for speech

 Medical diagnosis: From symptoms to illnesses

 Biometrics: Recognition/authentication using physical and/or behavioral


characteristics: Face, iris, signature, etc
41
Dr. M M Manjurul Islam
Face Recognition

Training examples of a person

Test images

ORL dataset,
AT&T Laboratories, Cambridge UK
42
Supervised Learning: Uses
◼ Prediction of future cases: Use the rule or model to
predict the output for future inputs

◼ Knowledge extraction: The rule is easy to understand

◼ Compression: The rule is simpler than the data it


explains

◼ Outlier detection: Exceptions that are not covered by the


rule, e.g., fraud

43
Unsupervised Learning
◼ Learning “what normally happens”

◼ Training experience: no output, unlabeled data

◼ Clustering: Grouping similar instances

◼ Example applications
 Customer segmentation in CRM
 Image compression: Color quantization
 Bioinformatics: Learning motifs

44
Reinforcement Learning
 Training experience: interaction with an environment; learning agent receives a
numerical reward
 Learning to play chess: moves are rewarded if they lead to WIN, else penalized
 No supervised output but delayed reward

 What to learn: a way of behaving that is very rewarding in the long run - Learning a
policy: A sequence of outputs

 Goal: estimate and maximize the long-term cumulative reward

 Credit assignment problem

 Robot in a maze, game playing

 Multiple agents, partial observability, ...


45
Dr. M M Manjurul Islam
Passive Learning and Active Learning
 Traditionally, learning algorithms have been passive learners, which
take a given batch of data and process it to produce a hypothesis or a
model

 Data → Learner → Model


 Active learners are instead allowed to query the environment
 Ask questions
 Perform experiments
 Open issues: how to query the environment optimally? how to
account for the cost of queries?

46
Dr. M M Manjurul Islam
Learning: Key Steps
• data and assumptions
– what data is available for the learning task?
– what can we assume about the problem?
• representation
– how should we represent the examples to be classified
• method and estimation
– what are the possible hypotheses?
– what learning algorithm to use to infer the most likely hypothesis?
– how do we adjust our predictions based on the feedback?
• evaluation
– how well are we doing?

Dr. M M Manjurul Islam


Dr. M M Manjurul Islam
Dr. M M Manjurul Islam
Dr. M M Manjurul Islam
51
Dr. M M Manjurul Islam
52
Dr. M M Manjurul Islam
Evaluation of Learning Systems
 Experimental
 Conduct controlled cross-validation experiments to compare various
methods on a variety of benchmark datasets.
 Gather data on their performance, e.g. test accuracy,
training-time, testing-time…
 Analyze differences for statistical significance.

 Theoretical
 Analyze algorithms mathematically and prove theorems about their:
 Computational complexity
 Ability to fit training data
 Sample complexity (number of training examples needed to learn an accurate
function)

Dr. M M Manjurul Islam


Measuring Performance
Performance of the learner can be measured in one of the
following ways, as suitable for the application:
 Classification Accuracy
 Number of mistakes
 Mean Squared Error
 Loss functions
 Solution quality (length, efficiency)
 Speed of performance
…

Dr. M M Manjurul Islam


55
Dr. M M Manjurul Islam
Textbook/ Reference Materials

1. Introduction to Machine Learning (MIT Press) by Ethem Alpaydin

Dr. M M Manjurul Islam

You might also like