How To Import Standardscaler In Python

[Solved] How To Import Standardscaler In Python | Scala - Code Explorer | yomemimo.com
Question : STandardScaler use example

Answered by : ebrahim-momin

from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
scaled_data = scaler.fit_transform(data)

Source : | Last Update : Thu, 14 Jul 22

Question : sklearn standardscaler

Answered by : orcun

from sklearn.preprocessing import StandardScaler
data = [[0, 0], [0, 0], [1, 1], [1, 1]]
scaler = StandardScaler()
print(scaler.mean_)
>>>[0.5 0.5]
print(scaler.transform(data))
>>>[[-1. -1.] [-1. -1.] [ 1. 1.] [ 1. 1.]]

Source : | Last Update : Mon, 24 Oct 22

Answers related to how to import standardscaler in python

Code Explorer Popular Question For Scala