Docsity

Linear Regression With One Variable-Machine Learning and Artificial Intelligence-Lecture Slides, Slides of Machine Learning

Partial preview of the text

Download Linear Regression With One Variable-Machine Learning and Artificial Intelligence-Lecture Slides and more Slides Machine Learning in PDF only on Docsity!

Linear regression

with one variable

Model representa6on

Machine Learning

0 100 200 300 400 500 0 500 1000 1500 2000 2500 3000 0 100 200 300 400 500 0 500 1000 1500 2000 2500 3000 Housing Prices (Portland, OR)

Price

(in 1000s

of dollars)

Size (feet

2

Supervised Learning

Given the “right answer” for

each example in the data.

Regression Problem

Predict real-­‐valued output

Training Set

Learning Algorithm

h

Size of

house

Es6mated

price

How do we represent h?

Linear regression with one variable. Univariate linear regression.

Cost func6on

Machine Learning

Linear regression

with one variable

y

x

Idea: Choose so that is close to for our training examples

Hypothesis:

Parameters:

Cost Func6on:

Goal:

Simplified

y

x

(for fixed , this is a func6on of x) (func6on of the parameter ) 0

y

x

(for fixed , this is a func6on of x) (func6on of the parameter ) 0

Cost func6on

intui6on II

Machine Learning

Linear regression

with one variable

(for fixed , this is a func6on of x) (func6on of the parameters ) 0 100 200 300 400 500 0 1000 2000 3000 Price ($) in 1000’s Size in feet^2 (x)

(for fixed , this is a func6on of x) (func6on of the parameters )

(for fixed , this is a func6on of x) (func6on of the parameters )