Linear regression

- Regression questions are marked as follows

Represents the number of instances in the training set Represents the feature / input variable represents the target variable / output variable represents the instance in the training set represents the th observation instance
[Suppose it can be written as h or as a function f]
insert image description here

- Way of working


This is how a supervised learning algorithm works, we can see that here we have our training set (house square meter x, house price y), we feed it to our learning algorithm, the learning algorithm works, and then output a function, usually denoted as a lowercase h or f. Represents hypothesis (hypothesis), which represents a function. The input is the size of the house, just like the house your friend wants to sell. Therefore, the y-hat value is obtained according to the input x value, and the y-hat value corresponds to the predicted price of the house. Therefore, it is a function mapping from x to y.
I will choose the initial use rule to represent hypothesis. Therefore, to solve the housing price prediction problem, we actually need to "feed" the training set to our learning algorithm, and then learn a hypothesis [which can be written as a hypothesis h or a function f], and then input the size of the house we want to predict as an input variable, and the predicted transaction price of the house is output as an output variable as a result. So, how do we formulate our house price prediction problem?

- way of expression

insert image description here
The expression is: Because there is only one feature/input variable, such a problem is called a univariate linear regression problem.

- Summarized as follows


Through the training set (x, y) to correct the hypothesis h [also called function f], then you can use this hypothesis h to input the feature/input variable x to predict the result y-hat.

Reference content:
Wu Enda Machine Learning
Machine Learning Notes

Guess you like

Origin blog.csdn.net/qq_45833373/article/details/131704087