CS代考 Introduction to Supervised Learning

Introduction to Supervised Learning

What Is Supervised Learning?

Copyright By PowCoder代写 加微信 powcoder

• One of the most prevalent forms of ML
• Teach a computer to do something, then let it use its knowledge to do it
• Also called “learning with a teacher” • Other forms of ML
• Unsupervised learning (“learning without a teacher”)
• Reinforcement learning (“learning with (delayed) feedback”)

Example: Spam detection
• Input: Emails received
• Output: “Spam”, or “No spam”

Example: Stock price prediction
• Input: Historical records of stock prices
• Output: Next day’s stock price

Spam detection
• Input: Emails received
• Output: “Spam”, or “No spam”
• This is a classification problem. The output has 2 possible values
Stock price prediction
• Input: Historical records of stock prices
• Output: Next day’s stock price
• This is a regression problem. The output is a real value.

Types of supervised learning
• Regression
• Classification • Binary
• Multi-class •…

Supervised learning
• Given some input x,
• Predict an appropriate output y.
Want: a function f such that f(x)=y
Have: examples of input-output pairs 𝒙 1 , 𝑦(1) , 𝒙 2 , 𝑦(2) ,…, 𝒙 𝑛 , 𝑦(𝑛) Supervised learning helps find a good f.

Training data
• Supervised learning needs annotated data for training: in the form of examples of (Input, Output) pairs
• After training completed,
• you present it with new Input that it hasn’t seen before • It needs to predict the appropriate Output

Is painting 8 a genuine Mondrian?

Annotated training data
Attributes
Line types
Rectangles
6 4 5 5 5 6 7
1 2 2 1 1 1 1
10 8 7 8 10 8 14
4 5 4 4 5 6 5
Yes Yes No Yes No
Line types
Rectangles
Painting 8

How quick will your team complete a project?
low 1000 …
medium 2000 …
high 2000 …
10 p-month
20 p-month
……………

General notation we will use
……………
Vector notation
𝑥(𝑖) = 𝑥(𝑖), 𝑥(𝑖), 𝑥(𝑖), … , 𝑥(𝑖) 123 𝑑
The input of the i-th example
Attributes

Workflow of supervised learning: 1. Training phase
𝒙𝒙 1 , 𝑦𝑦(1) , 𝒙𝒙 2 , 𝑦𝑦(2) ,…, 𝒙𝒙 𝑛𝑛 , 𝑦𝑦(𝑛𝑛) ML Algorithm

Workflow of supervised learning: 2. Test phase & use

Pictorially
• Regression problem • Classification problem Breast cancer prediction

Pictorially
• Regression problem
• Classification problem Breast cancer prediction

Terminology in Supervised Learning
• Input = attribute(s) = feature(s) = independent variable • Output = target = response = dependent variable
• function = hypothesis = predictor

Pause. Is this some magic?
• there is this unknown function we’re after
• we are given the function values at n specific points only (training set) • is it really possible to find out the function values at other points?
• Not unless we make the right assumptions about the unknown function • Each ML algorithm, implicitly or explicitly, makes assumptions.
• There is a zoo of ML algorithms, there is no best ML algorithm
• Our goal is to focus on few of them, and understand how they work

Applications of supervised learning
• Handwriting recognition
• When you write an envelope, algorithms can automatically route envelopes
through the post
• Computer vision & graphics
• When you go out during lockdown, object detection & visual tracking algorithms can automatically detect compliance with the rules
• Bioinformatics
• Algorithms can predict protein function from sequence
• Human-computer interaction
• Intrusion detection algorithms can recognise speech, gestures, intention

Why is ML so Prevalent?
• Generality
• E.g. a robot learning to navigate mazes must be able to learn the layout of the
maze it encounters • Adaptability
• E.g. a program designed to predict tomorrow’s stock market must learn to adapt when conditions change from boom to bust
• Applicability
• Often the human programmer has no idea how to program a solution to the problem (think of how you recognise your friend’s face)

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com