Linear regression and nonlinear regression (study notes)

Regression (Regression)

"Return to moderate"


Rate Forecast:

Prices forecast
Feature value (feature) tag / results (target)
model

  • Regression (regression analysis) is used to establish how the correlation equation between the two or more simulation variables
  • Predicted variable named: dependent variable (dependent variable), the output (output)
  • It is used to predict variable called: argument (independent variable), the input (input)
  • Linear regression comprises a variable and a dependent variable from
  • With a relationship between two or more variables to simulate a straight line
  • If contains two or more independent variables, multiple regression analysis (multiple regression) is referred to as

 

\[ a_\theta(x) = \theta_0 + \theta_1x \]

This equation corresponds to a straight line image, called the regression line. Wherein, \ (\ theta_1 \) is the slope of the regression line, \ (\ theta_0 \) is the intercept of the regression line. \ (X \) is because there is only one argument.

Linear regression - a positive correlation:
Equation image

Linear regression - a negative correlation:
Negative correlation image

Linear regression - not relevant:
Irrelevant image


Solving equation coefficients:

Solving equation coefficients 1

 

It determines which line is preferably:

Solving equation coefficients 2

 

The cost function (Cost Function)

  • Least squares method
  • True value y, the predicted value \ (H_ \ Theta (X) \) , the squared error \ ((y -h_ \ theta ( x)) ^ 2 \)
  • Find the parameters depending on the core, so that the sum of squared errors:

\[ j(\theta_0,\theta_1) = \frac{1}{2m}\sum_(i = 1)^m(y^i - h_\theta(x^i))^2 最小 \]

The cost function 1

Guess you like

Origin www.cnblogs.com/deliberate-cha/p/12291772.html