Unscaled channels and target #266
-
Is it possible to run DelayedSaturatedMMM in an unscaled way? For example, if I'm building a model the has spend dollars for various channels and sales as a target, I'd like to see each coefficient show the impact a dollar spent by channel has on sales. Looking through the code, I believe each channel and target are scaled using sklearn MaxAbsScaler. If a channel had a max value of $5, while another had a max value of $100 - they would both be showing a 1.0 for the channel x, and resulting coefficients. I don't think this creates any mathematical issues, but makes the results a bit harder to conceptualize (ex betas in terms of individually scaled values). Any advice on how to approach this? Perhaps something obvious I'm missing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
At the moment, you will need to create a new class to do this. One that doesn’t inherit from |
Beta Was this translation helpful? Give feedback.
At the moment, you will need to create a new class to do this. One that doesn’t inherit from
MaxAbsScaleTarget
andMaxAbsScaleChannels
. You would basically need to copy thebuild_model
method from theDelayedSaturatedMMM
into your new class.@juanitorduz, it might be worthwhile to do a small refactor, so that there’s base MMM that doesn’t do any preprocessing and then provide the special case of the max scaler, etc. That would also make it easier to supply different preprocessing strategies