Andrew ng machine learning of two single variable linear regression __ machine learning

Source: Internet
Author: User
Tags andrew ng machine learning
Model Representation

NG Video has an example of a house price, a data set between the House area X and the price y:

area (x) Price (y)
2104 460
1416 232
1534 315
852 178
... ...

Here is defined:

m: Number of training samples, M = 4 visible in the table above
x (i) x^{(i)} : I i input variables/features, in multiple input variables x (i) x^{(i)} represents a set of inputs, such as X (1) =1416 x^{(1)}=1416 in the previous table.
y (i) y^{(i)} : output, such as Y (1) =232 y^{(1) In the previous table}=232

The process of introducing a hypothetical function (hypothesis function) hθ (x) H_\theta (x) in the original text is shown in figure:

That is, to seek a mapping function from x x to Y y, which is what the learning algorithm ultimately obtains by learning the contents of a dataset. So how do you find this hypothetical function? Obviously this is a regression problem (which distinguishes between classification and regression in the previous article), if only the univariate linear regression is discussed, then the form of the assumed function can be written as hθ (x) =θ0+θ1x H_\theta (x) =\theta_0+\theta_1x, in order to hθ (x) H_\theta (x) for analysis, we introduce the loss function . loss functions (cost function)

The introduction of the loss function is derived from the evaluation of the assumption function.
Assuming we've got a hypothetical function hθ (x) =θ0+θ1x H_\theta (x) =\theta_0+\theta_1x, now we need to evaluate the mapping capabilities of this function, and how to do it. One approach is to obtain the variance of the hθ (x (i)) H_\theta (x^{(i)}) and Y (i) y^{(i)} based on the assumed function for x (i) x^{(i)}, as follows:
  
J

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.