English feliratok

← Comparing Features with Different Scales - Intro to Machine Learning

Beágyazókód kérése
4 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. So the way that I got the result that Chris,
  2. should be wearing the same size tee shirt as Sarah rather than Cameron,
  3. is that I compared these numbers that I computed for each of these people.
  4. And I said is Chris closer to Cameron's number or to Sarah's number, and as it
  5. turns out, he's about 26 away from Sarah and he's about 35 away from Cameron.
  6. Closer to Sarah.
  7. Now what went wrong here is that this metric of height plus weight
  8. has two very imbalanced features in it, height and weight.
  9. So here's what I mean by that, the height is going to
  10. be a number that generally goes between let's say, the numbers of five and
  11. seven, the weight, on the other hand, takes on much larger values.
  12. Between 115 and 175 pounds in this example.
  13. So what ends up happening when you compute the sum of the two of them, is that
  14. the weight almost always will completely dominate the answer that you get.
  15. And height ends up being effectively a rounding error.
  16. Whereas what you probably want is something where the two features are equally
  17. weighted in, in the sum when you add them together.
  18. And this is what feature scaling does.
  19. It's a method for re-scaling features like these ones,
  20. so that they always span comparable ranges, usually between zero and one.
  21. So then, the numbers that you get from height will be between zero and one,
  22. they'll still contain the same information.
  23. But just expressed in different units.
  24. And the weight will also be expressed between zero and one.
  25. Again, you'll still have the information there, that Cameron raised the most and
  26. Sarah raised the least, but it'll be expressed over this much smaller range.
  27. Then when you add them together,
  28. weight won't completely dominate the equation anymore.
  29. And when that happens, you should get a much more sensible result for
  30. Chris's t-shirt size.
  31. Because even though he's a little bit closer to Sarah in weight,
  32. he's a lot closer to Cameron in height and so
  33. he'll probably end up getting grouped with Cameron.
  34. In the next video I'll show you the equation for feature scaling.