An Introduction to Hierarchical Modeling
mfviz.com
mfviz.com
To me, the point of a hierarchical model is that one can assume relationships between these parameters (e.g. suppose that they are from the same distribution). Then when one department has very few data points, some of the information in your beliefs about the parameters for that department come from what you learned in other departments. E.g. the base salary is likely to be similar to base salaries of other departments.
I was expecting something bayesian-related given that bayesian statistics lends itself to hierarchical models quite nicely.
You wouldn't actually add salary as an interaction, as it is salary you are trying to predict. You'd use an interaction between experience and department to predict salary, as you correctly point out.
But usually when doing interactions, you don't apply it to the bias term, so you will get this:
salary = b0 + b1*d1*exp + b2*d2*exp ...
And this is essentially a model for each department, but all models share the bias term, b0.If you also interact the bias term with the dummy variable for department, you will in effect have completely independent models,
salary = b0,1*d1 + b1*d1*exp + b0,2*d2 * b2*d2*exp ...
But I don't think that is what is normally done when applying interactions between features.Anyway, I think we both agree, once we get our terminology aligned.
https://statmodeling.stat.columbia.edu/2018/03/15/need-16-ti...
This [6] is a more in depth look at hierarchical / multi-level modeling. The prediction section [7] specifically goes over cross validation and inference.
[1] https://www.tensorflow.org/probability/examples/Multilevel_M... [2] https://pyro.ai/examples/forecasting_iii.html [3] http://edwardlib.org/ [4] https://mc-stan.org/ [5] https://docs.pymc.io/ [6] https://docs.pymc.io/notebooks/multilevel_modeling.html [7] https://docs.pymc.io/notebooks/multilevel_modeling.html#Pred...
Why not use a SVM?