1. The key knowledge points in this section are summed up in your own words, can be accompanied by pictures, and explain the importance of the knowledge points
In this lesson, I mainly studied the linear regression algorithm and understood the definition of the algorithm: linear regression predicts unknown data based on existing data . For example: ① House price prediction, as shown in Figure 1-1 , and data visualization as shown in Figure 1-2 ;
Figure 1-1 Predicting prices by area
Figure 1-2 draws a linear relationship between area and house price
②Sales forecast , as shown in Figure 1-3;
Figure 1-3 Forecast by sales over the years
③ Loan forecast , as shown in Figure 1-4 . and many more. . .
Figure 1-4 Forecasting the loan amount based on personal integrity
Advantages and disadvantages of linear regression algorithm:
advantage:
①Simple thinking and easy implementation. Rapid modeling, effective for small data volume and simple relationship;
② is the basis of many powerful nonlinear models.
③The linear regression model is very easy to understand, and the results are very interpretable, which is conducive to decision analysis.
④ contains many important ideas in machine learning.
⑤ Can solve the regression problem.
Disadvantages:
① It is difficult to model non-linear data or polynomial regression with correlation between data features .
②It is difficult to express highly complex data well.
There is also a certain error between the machine prediction and the real value, then you need to use the algorithm to reduce the error as much as possible: normal equation, gradient descent method.
Method 1: Normal equation
Method 2: gradient descent
2. Thinking about what linear regression algorithms can be used for?
Classroom examples: house price forecast, sales forecast, quota loan forecast
PS : There are many examples in life where linear regression algorithms can be used to predict unknown data:
① Forecast weather conditions;
②The forecast of the company's sales revenue and advertising expenditure;
③Predict the crime rate according to the crime committed in a certain place
3. Write a linear regression algorithm independently, the data can be made by yourself, or obtained from the Internet. (Plus points)