05 - Linear regression algorithm

Introduction

In supervised learning, mainly divided into two categories: regression and classification
Regression: Simply put, the digital to the point, and finally a predicted value
eg: bank loan is a loan of interval range, input data can be personal income, age and other data; the value of final output is bank specific able to loan money
Category: given some of the data, the final calculated is divided into a certain class middle
eg: the example above, only in final result the specific amount of loans banks can not, but whether they have the qualifications loan
Here Insert Picture Description
note here, in the middle of the final completion of the integration of the equation, using the calculation matrix, generally do not use a ride in the middle of a learning machine way, using a matrix of way will be more efficient

Analysis of the error term

Error: between the true and predicted values there is certainly a difference, using ε represented
Here Insert Picture Description
below into the relationship between the predicted value and the error to a Gaussian distribution:
Here Insert Picture Description
Here Insert Picture Description
in the likelihood function mentioned above, in fact, given a heap of samples and then predicted a parameter, so that the parameters of these samples and data integration, and finally get out of the value of closer to the true value
Here Insert Picture Description
at the time of the above simplification, because of the need to meet the right of a maximum likelihood function, then the above formula should be as small as possible, and everything to the left is a constant (not much effect on the results, remove), and finally got the least squares method between the above figure
above has been the least squares method, if you want this goal function to obtain a minimum value (the error between the true value and the predicted value smaller the better)
Here Insert Picture Description
as shown above, will be by way of the partial derivatives, when the partial derivatives equal to zero, that is, a minimum point, so they will know the value of the content
Here Insert Picture Description

Residual sum of squares: The difference between the predicted value and the true value
Summary: R ^ 2 value is closer to 1 the better; closer to 0 indicates the worse

Guess you like

Origin blog.csdn.net/Escid/article/details/90710021