Machine learning basics: linear regression and Normal Equation

Source: Internet
Author: User
This article will cover: (1) Another Linear Regression Method: normal equation; (2) Advantages and Disadvantages of gradient descent and normal equation;

Previously we used the Gradient Descent Method for linear regression, but gradient descent has the following features:

(1) learning rate needs to be selected in advance; (2) Multiple iteration is required; (3) feature scaling is required; therefore, it may be troublesome, this article introduces a method suitable for the use of a small number of feature: normal equation; use normal equation when the number of feature is smaller than 100000; Use gradient descent when the number of feature is greater than 100000; normal equation has the following features: simple, convenient, and does not require feature scaling. The formula of normal equation indicates the I training example; indicates the value of the J feature in the I training example; m is # training example; n is # feature;

For example:

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.