课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

Scale()

Scale()

- [Trainer] When I spoke about clustering in the past and machine learning with a neural net. Something you need to do is scale your values so that when a neural net or a cluster is comparing two values. They're on essentially the same continuum, versus one possibly being logarithmic and one being linear. Are provides scale. And let's take a look at how Scale actually works. So that you better understand it when you use it. The easiest way to understand what Scale does is to run it. So in line six, I've said. Scale the values from one to 11. And in return what we get, you can see, we have not the values from one to 11, but we have a scale of the values starting at zero at the sixth value. Now we can take a look visually what's going on. And if I in line eight plot scale, one through 11, you can see that the x-axis is one, two, three, four, five, six, seven, eight, nine, 10, 11. And the y-axis…

内容