I am working on a keras regression network that takes about 60 input variables and outputs 35 variables. For both the input and output, about half of the variables are in the range of ±10, while the other half of the variables are around the 100 000s. So there's a large disparity in magnitude, but I want all the inputs/outputs to be treated as equally important. As such, I currently do a max-mean scaling of both the input and output data, such that each distribution is entered at zero and within a [-1,1] range:
xi' = (xi - mean(X)) / max(|X|).
This means that I have to save the max and mean values for each of the input and output variables. Then, during testing or prediction, I have to re-load these max and mean values to scale the inputs and then un-scale the predictions that my model gives back.
I'm wondering if there is any way to sort of "bake-in" this scaling such that I don't have to re-load the max and mean values. For example, I saw this post where they created a layer for min-max scaling. My understanding is that it's pretty easy to create a layer that scales the inputs, but is there a way to have the model train with scaled targets but return unscaled predictions? Alternatively, am I wasting my time scaling the outputs and should I try training on un-scaled targets?