English subtitles

← Algorithms Requiring Rescaling Solution - Intro to Machine Learning

Get Embed Code
4 Languages

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

  1. So Katie, what do you think?
  2. Which ones are the right answers here?
  3. >> The right answers, so the, the ones that do need rescaled features will
  4. be the SVM and the k-means clustering.
  5. >> So both and, support vector machines in, in, in k-means clustering, you're
  6. really trading off one dimension to the other when you calculate the distance.
  7. So take, for example, support vector machines.
  8. And you look at the separation line that maximizes distance.
  9. In there, you calculate a distance.
  10. And that distance calculation, trade-offs one dimension against the other.
  11. So we make one twice as big as the other, it counts for twice as much.
  12. The same is true, coincidentally, for
  13. k-means clustering, where you have a cluster center.
  14. And you compute the distance of the cluster center, to all the data points.
  15. And that distance itself has exactly the same characterization.
  16. If you make one variable twice as big, it's going to count for twice as much.
  17. So, as a result, support vector machines and
  18. k-means both are affected by feature rescaling.
  19. So, Katie, tell me about the decision trees and linear regression.
  20. Why aren't they included?
  21. Decision trees aren't going to give you a diagonal line like that, right?
  22. They're going to give you a series of vertical and horizontal lines.
  23. So there's no trade off.
  24. You just, make a cut in one direction, and then a cut in another.
  25. So, you don't have to worry about what's going on in one dimension,
  26. when you're doing something with the other one.
  27. >> So if you squeeze this area little area over here to half the size,
  28. because you rescale the feature where the image line lies.
  29. Well, it'll lie in a different place but
  30. the separation is chronologically the same as before.
  31. It scales with it,
  32. so there's no trade-off between these two different variables.
  33. And how about, linear regression?
  34. >> Something similar happens in linear regression.
  35. Remember that in linear regression,
  36. each of our features is going to have a coefficient that's associated with it.
  37. And that coefficient and that feature always go together.
  38. What's going on with feature A doesn't effect anything with
  39. the coefficient of feature B.
  40. So they're separated in the same way.
  41. >> In fact, if you were to double the variable scale of one specific variable,
  42. that feature will just become half as big.
  43. And the output would be exactly the same as before.
  44. So it's really interesting to see, and for some algorithms,
  45. rescaling is really a potential if we can use it, for others, don't even bother.