Smartsheet machine learning pipelines may contain features with very different numeric ranges. Implement a function that transforms a feature matrix using either min-max normalization or population z-score standardization.
Given X, a non-empty rectangular matrix represented as a list of rows, where each row is one sample and each column is one feature, and a string method:
method = "minmax", scale each column to the range [0, 1] using (x - minimum) / (maximum - minimum).method = "standard", transform each column using (x - mean) / standard_deviation, where the mean and standard deviation are computed across all rows. Use population standard deviation, dividing variance by the number of rows.0.0 for every value in that column.X.def scale_features(X, method):