TidyX Episode 139: Custom z-score function with pre-specified population parameters

This week, Ellis Hughes and I work through a custom function for calculating z-scores conditional on specific population parameters.

Often, when building models, it is common to normalize the data to get all of the features onto the same scale. Occasionally we are dealing with a situation where we want to scale the most recent data (e.g., this year’s data) with the mean and standard deviation of prior year’s data. Another example would be scaling our testing set to the mean and standard deviation of a training set. Thus, we create a custom function to handle this task. We go step-by-step through our process of construction the function and show the errors along the way and the iterations we went through.

To watch the screen cast, CLICK HERE.

To access our code, CLICK HERE.