Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

CSDS 440: Machine Learning

https://cwru.zoom.us/rec/share/VFF2_kTCzStLsIcdoi3BGSZfOjYbTHhmLAkLYmMI1bh5k8IZn5251DNHdGY
msa0m.ql_xIEDlWLXfkOu-

Soumya Ray (sray@case.edu)


Office: Zoomlandia 920 0026 0871/ 598943
Office hours: F 9-10am or by appointment
• Please ensure your full name is visible on zoom.
• Check that your mic is connected by looking for the mic symbol next to your name in the
Participants list. If not you can configure your mic and speakers using arrow next to the mic
button in the lower left of the zoom interface.
• You will be muted on entry (mic symbol has a line through it). Unmute to ask/answer
questions.
• Leave your mic on mute and video off until you are speaking.
• To ask a question, use “Raise Hand” and wait to be called or send your question via chat.
• To answer a question, use “Raise Hand” and wait to be called.
• After asking or answering your question, click “Raise Hand” again to lower your hand.
• This meeting is being recorded. The recording will be made available, likely via canvas.
• If I drop out/can’t be heard/screen freezes/slides disappear etc, please send a note in the chat
window.
• If I get disconnected completely, I will rejoin asap. Please be patient and wait. If there is a
serious issue and I cannot rejoin, I will send email and the class will be postponed.

9/2/2020 Soumya Ray, Case Western Reserve U. 1


Announcements
• No office hours Friday
• TA office hours (same zoom ID):
– Robbie: T, Th 11:15am-1pm
– Naren: W 1-2pm
– Kyle Th 9pm-10pm (EST)
• Slack workspace/channel
• Zoom videos

9/2/2020 Soumya Ray, Case Western Reserve U. 2


Recap
• What is a random variable?
• What is an atomic event? Event? Sample space?
• What are the axioms of probability?
• What is the “joint pdf”?
• p(X|Y)=_______________
• What is Bayes’ Rule? What is its significance?
• When are two r.v.’s independent? What is the
significance of independence?
• What are IID r.v.’s?
• What is the expectation of a rv?
• What is the variance of a rv?
9/2/2020 Soumya Ray, Case Western Reserve U. 3
Today
• Intro to machine Learning

9/2/2020 Soumya Ray, Case Western Reserve U. 4


What is “machine learning”?
• “Machine”=autonomous system
– No (or limited) human intervention
– Robots, software agents, etc.

9/2/2020 Soumya Ray, Case Western Reserve U. 5


What is “Learning”?
“Learning denotes changes in the
system that enable the system to
do the same task more effectively
the next time.”
—Herbert Simon (1916-2001)
– Also, how to do related tasks
more effectively

9/2/2020 Soumya Ray, Case Western Reserve U. 6


A Specification for a Learning System
• Given: Task goal, task examples E,
performance measure P

• Do: Produce a concept that is good with


respect to P on all examples of the task
– Measured by proxy on E

9/2/2020 Soumya Ray, Case Western Reserve U. 7


Example
• Learning Task: Learn to play chess
• Performance measure?
– Games won/lost
• Examples?
– Games played (sequences of moves till win/loss)
• Concept?
– Some function mapping current state of game to
suitable moves to play

9/2/2020 Soumya Ray, Case Western Reserve U. 8


Idea
• If the learning system plays enough games,

• And it produces a mapping from game state to


moves (concept),

• And this concept does well with respect to the


measure of “number of games won”,

• Then the system has “learned to play chess”

9/2/2020 Soumya Ray, Case Western Reserve U. 9


Other Examples
• Learn to recognize lions
– E: animals, annotated “lion” or “not-lion”
– P: fraction of animals correctly recognized as
lion/not-lion
• Learn to drive
– E: sequence of road/traffic conditions and correct
vehicle operation
– P: distance traveled without accident

9/2/2020 Soumya Ray, Case Western Reserve U. 10


Two Phases of Learning
• “Learning” or “Training” phase
– Reason about the examples E
– Formulate a concept that does well w.r.t. P on E
– Could also use any prior knowledge

• “Evaluation” or “Testing” phase


– Use learned concept on future, novel examples

9/2/2020 Soumya Ray, Case Western Reserve U. 11


Online and Batch (Offline) Learning
• Batch/Offline Learning: one learning phase,
with a large set of examples, followed by a
testing phase

• Online learning: Examples arrive one at a time


(or in small groups); learning and evaluation
phases are iterated

9/2/2020 Soumya Ray, Case Western Reserve U. 12


Inductive Generalization
• In all learning problems, need to reason from
specific examples to a general case
– Memorization ≠ Learning

• Other kinds of reasoning


– deduction (general to specific)
– abduction (most likely cause)

9/2/2020 Soumya Ray, Case Western Reserve U. 13


Target Concept
• The unknown underlying concept that solves
the learning task
• E.g., “has-fur” and “long-teeth” and “looks-scary” → “lion”

• Typically, P will be a measure of difference


between the learner’s concept and the target
concept, with respect to E

9/2/2020 Soumya Ray, Case Western Reserve U. 14


Hypothesis Space
• Defines the space of general concepts the
learning system will consider
– E.g., all possible conjunctions of animal properties

• Ideally, target concept is a member of this


space
– What if it isn’t?
• Maybe we should include all possible hypotheses?

9/2/2020 Soumya Ray, Case Western Reserve U. 15


No “Tabula Rasa” Learning
• A space that includes all possible hypotheses also
– Contains many overly complex concepts
– Contains the concept that memorizes E
• Indistinguishable from target by any P (w.r.t. E)
– May be too big to search feasibly

• For effective inductive generalization


– Must restrict hypothesis space
– while still (hopefully) keeping the target concept in it

9/2/2020 Soumya Ray, Case Western Reserve U. 16


Inductive Bias
• The set of assumptions used by a learning
system to restrict its hypothesis space

• The more assumptions made, the “stronger”


the bias

• Can quantify this (later)


– It can be related to statistical bias in parameter
estimates

9/2/2020 Soumya Ray, Case Western Reserve U. 17


Supervised Learning
• Examples E are annotated with target
concept’s output by a teacher/oracle

• Learning system must find a concept that


matches annotations (P)

• Example: learn to recognize animals

9/2/2020 Soumya Ray, Case Western Reserve U. 18


Supervised Learning

tiger

cow

Note: oracle’s
annotation does
elephant not need to be
correct!!

starfish

9/2/2020 Soumya Ray, Case Western Reserve U. 19


Other Learning Paradigms
• Unsupervised Learning
• Semi-supervised Learning
• Active Learning
• Transductive Learning
• Transfer Learning
• Structured Prediction
• Reinforcement Learning
• Preference Learning (Ranking)
• “Few-shot” learning

9/2/2020 Soumya Ray, Case Western Reserve U. 20


Example Representation
• What is the internal representation of an
example in a learning system?

• Representation choice affects reasoning and


the choice of hypothesis space, and the cost
of learning

9/2/2020 Soumya Ray, Case Western Reserve U. 21


Feature Vector Representation
• Examples are attribute-value pairs (note “feature”==“attribute”)
• Number of attributes are fixed
• Can be written as an n-by-m matrix

Attribute1 Attribute2 Attribute3

Example1 Value11 Value12 Value13


Feature
Example2 Value21 Value22 Value23 Vectors

Example3 Value31 Value32 Value33

9/2/2020 Soumya Ray, Case Western Reserve U. 22


Example

Has-fur? Long-Teeth? Scary?

Animal1 Yes No No

Animal2 No Yes Yes

Animal3 Yes Yes Yes

9/2/2020 Soumya Ray, Case Western Reserve U. 23


Types of Features
• Discrete, Nominal • Color ∈ (red, blue,
green)
• Continuous • Height

• Discrete, Ordered • Size ∈ (small, medium,


large)
• Hierarchical • Shape ∈ closed
polygon continuous

square triangle circle ellipse

9/2/2020 Soumya Ray, Case Western Reserve U. 24


Feature Space
• We can think of examples embedded in an n
dimensional vector space

Size
Big

Square Shape

15
Weight

9/2/2020 Soumya Ray, Case Western Reserve U. 25


Other Example Representations
• Relational representation
• Multiple-instance representation
• Sequential representation
• Multi-view representation

9/2/2020 Soumya Ray, Case Western Reserve U. 26


The Binary Classification Problem
• Simplest propositional supervised learning
problem

• Target concept assigns one of two labels


(“positive” or “negative”) to all examples---the
class label

• Can extend to “multiclass”, “regression”,


“multi-label” problems
9/2/2020 Soumya Ray, Case Western Reserve U. 27
Example
X Y
Has-fur? Long-Teeth? Scary? Lion?

No
Animal1 Yes No No (xi, yi)
(xij)

Animal2 No Yes Yes No

Animal3 Yes Yes Yes Yes

9/2/2020 Soumya Ray, Case Western Reserve U. 28


Example in Feature Space

Size

Shape

Weight

9/2/2020 Soumya Ray, Case Western Reserve U. 29


The Learning Problem
• Given: A binary classification problem

• Do: Produce a “classifier” (concept) that


assigns a label to a new example

9/2/2020 Soumya Ray, Case Western Reserve U. 30


Binary Classifier Concept Geometry
• (Union of ) N-dimensional volume(s) in feature
space (possibly a disjoint collection)
Size

Decision Boundary/
Separating Surface

Shape

Weight

9/2/2020 Soumya Ray, Case Western Reserve U. 31

You might also like