Supervised Learning & Unsupervised LearningXX1Supervised LearningUnsupervised Learning
x1 x2 Supervised Learning & Unsupervised Learning Supervised Learning Unsupervised Learning
Linear Regression with oneVariable500Housing PricesX400(Portland, OR)300Price(in 1000s200of dollars)1000150005001000200025003000Size (feet2)Supervised LearningRegressionProblemGiven the“right answer"forPredict real-valued outputeachexample inthedata
Linear Regression with one Variable Housing Prices (Portland, OR) Price (in 1000s of dollars) Size (feet2 ) Supervised Learning Given the “right answer” for each example in the data. Regression Problem Predict real-valued output
Price ($) in 1000's (y)Size in feet2 (x)Training set of2104housing prices14161534Notation:Training Setm=Number of training examplesLearning Algorithmx's=“input"variable/featuresy's=“output"variable/“target"variableEstimatedSize ofpricehouseQuestion : How to describe h?
Notation: m = Number of training examples x ’ s = “input” variable / features y ’ s = “output” variable / “target” variable Size in feet2 (x) Price ($) in 1000's (y) 2104 1416 1534 . . Training set of housing prices Training Set Learning Algorithm h Size of house Estimated price Question : How to describe h?
Price ($) in 1000's (y)Size in feet2 (x)Training Set210414161534Hypothesis: he(α) = Qo + Q1αQi's:ParametersHow to choose O,s ?
How to choose ‘s ? Training Set Hypothesis: ‘s: Parameters Size in feet2 (x) Price ($) in 1000's (y) 2104 1416 1534 .
yXIdea: Choose Jo, O1 so thathe(c)is close to y for ourtraining examples (c, y)
y x Idea: Choose so that is close to for our training examples