# #26 Machine Learning Specialization [Course 1, Week 2, Lesson 2] | Summary and Q&A

15.4K views
β’
December 1, 2022
by
DeepLearningAI
#26 Machine Learning Specialization [Course 1, Week 2, Lesson 2]

## TL;DR

Learn how to scale features with different value ranges, such as dividing by the maximum or mean normalization, to make them comparable.

## Key Insights

• π§‘ Feature scaling involves making features with different value ranges comparable to each other.
• ποΈ Dividing by the maximum value can be used for scaling.
• 0οΈβ£ Mean normalization rescales features to have a mean of zero.
• π€ͺ Z-score normalization involves dividing by the standard deviation of each feature.
• π§‘ Aim for features to range from approximately -1 to +1.
• β Feature scaling can improve the performance of gradient descent algorithms.
• βΈοΈ There is generally no harm in carrying out feature scaling.

## Transcript

let's look at how you can Implement feature scaling to take features that take on very different ranges of values and scale them to have comparable ranges of value to each other so how do you actually scale features well if X1 ranges from three to two thousand one way to get the scale version of X1 is to take each original X1 value and divide by 20... Read More

### Q: What is feature scaling?

Feature scaling is a technique used to bring features with different value ranges into a comparable range.

### Q: How can you scale X1 using the maximum value?

To scale X1, divide each original value by the maximum value of the range (2000), resulting in a scaled range of 0.15 to 1.

### Q: What is mean normalization?

Mean normalization rescales features to have a mean of zero by subtracting the mean and dividing by the difference between the maximum and minimum values.

### Q: How can you scale X2 using mean normalization?

To scale X2 using mean normalization, subtract the mean (average) value and divide by the difference between the maximum and minimum values, resulting in a range of -0.46 to 0.54.

## Summary & Key Takeaways

• Feature scaling can help bring features with different value ranges into a comparable range by dividing by the maximum value or using mean normalization.

• Scaling X1 range of 3 to 2000 to a range of 0.15 to 1 by dividing each value by 2000.

• Scaling X2 range of 0 to 5 to a range of 0 to 1 by dividing each value by 5.