Your question is Feature Scaling Function. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
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):