standardization another useful data preprocessing technique which is basically used to transform the data attributes with gaussian distribution it differs the mean and sd (standard deviationto standard gaussian distribution with mean of and sd of this technique is useful in ml algorithms like linear regressionlogistic regression that assumes gaussian distribution in input dataset and produce better results with rescaled data we can standardize the data (mean and sd = with the help of standardscaler class of scikit-learn python library example in this examplewe will rescale the data of pima indians diabetes dataset which we used earlier firstthe csv data will be loaded and then with the help of standardscaler class it will be converted into gaussian distribution with mean and sd the first few lines of following script are same as we have written in previous while loading csv data from sklearn preprocessing import standardscaler from pandas import read_csv from numpy import set_printoptions path ' :\pima-indians-diabetes csvnames ['preg''plas''pres''skin''test''mass''pedi''age''class'dataframe read_csv(pathnames=namesarray dataframe values nowwe can use standardscaler class to rescale the data data_scaler standardscaler(fit(arraydata_rescaled data_scaler transform(arraywe can also summarize the data for output as per our choice herewe are setting the precision to and showing the first rows in the output set_printoptions(precision= print ("\nrescaled data:\ "data_rescaled [ : ]output rescaled data[ [- - - - - - - - - - - - - - [- - - - - - -