Machine Learning - Univariate linear regression

Machine learning univariate linear regression

model representation model representation

introduction

 Given data housing area and house prices, then housing area as the abscissa, ordinate housing price, the plotted data points. By drawing curves, get the model house prices, housing prices is obtained based on floor area, which is a Regression Problem (regression).

definition

 Regression is based on an accurate means of data before output value predicted, i.e., predict real_valued output.
 Training set notation:
  m = Number The of Training examples there are m groups housing area and price data
  x's = "input" variable / features House size
  y's = "output" variable / features house price
  (x, y) = one training example a training sample

training

 The learning algorithm is fed the data set, Learning Algorithm, the output function H , H is a mapping from x to y.
Housing area based on the input x, by function h calculated the housing prices y.
Linear regression step
Said following equation
H (X) = [theta] 0 + [theta] . 1 X
is a
Linear regression with one variable or Univariate linear regression (univariate linear regression)

Cost Function The cost function

[theta] I : model parameters, i.e., a linear function

h(x) = θ 0 + θ 1x

Parameters:
i 0 , i 1

Cost Function The cost function:

J( θ 0, θ 1)=Σ( h( x (i) )- y (i)) 2/( 2 m)

I.e. squared error loss function square error function.
Goal target:
Make J a minimum, to obtain [theta] 0 and [theta] . 1

Guess you like

Origin www.cnblogs.com/qjwzmy/p/12162035.html