简体   繁体   中英

I'm trying to standardize my attribute but I'm getting standard scaler error because Python can not find it

I'm trying to use a standard scaler but Python could not find, here is the error:

z_scaler = Standardscaler() 
 
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-13-09f39beade2e> in <module>
----> 1 z_scaler = Standardscaler()

NameError: name 'Standardscaler' is not defined

Is there any particular package I need for Standard Scaler?

您正在寻找StandardScaler ,而不是Standardscaler

from sklearn.preprocessing import StandardScaler

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM