# scale the data from sklearn.preprocessing import StandardScaler scaler = StandardScaler() scaler.fit(x) x = scaler.transform(x)