Coursera Machine Learning Study notes (ix)

Source: Internet
Author: User

-Feature Scaling

When we are faced with multidimensional feature problems, we need to ensure that the multidimensional features have similar scales, which will help the gradient descent algorithm to converge faster.

Take the housing price forecast problem as an example, assuming that the two characteristics we use, namely the size of the house and the number of rooms, the size value range is 0-2000 square feet, and the value of the room number is 0-5, which causes the gradient descent algorithm to require a very many iterations to converge:

To do this, we need to shrink the multidimensional features so that all the features are scaled as far as possible before -1~1. Therefore, our solution is to make:


Where (the average of a feature in a training sample) is the mean, (the difference between the maximum and minimum of a feature in a training sample) is the standard deviation.



Coursera Machine Learning Study notes (ix)

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.