Generation

generate functionWed, 15 Mar 2023

Write code that brings all the values of sl and sw variables to the same scale using the StandardScaler library from the sklearn.preprocessing library: sl = data['sepal_length'] sw = data['sepal_width']

from sklearn.preprocessing import StandardScaler def scale(sl, sw): scaler = StandardScaler() return scaler.fit_transform(sl, sw) scale(sl, sw)

Questions about programming?Chat with your personal AI assistant