![Python Machine Learning Cookbook(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/720/36698720/b_36698720.jpg)
上QQ阅读APP看书,第一时间看更新
Getting ready
We'll use the min-max method (usually called feature scaling) to get all of the scaled data in the range [0, 1]. The formula used to achieve this is as follows:
![](https://epubservercos.yuewen.com/715797/19470380108815806/epubprivate/OEBPS/Images/712d644f-628b-45b5-8780-0cba11437037.png?sign=1739523423-Ft8YSP2HMGzro7K2F0p2AJFQsevA4Nfs-0-7f8e11a61ff9cbc4e6b26ebf885d3adc)
To scale features between a given minimum and maximum value—in our case, between 0 and 1—so that the maximum absolute value of each feature is scaled to unit size, the preprocessing.MinMaxScaler() function can be used.