Re:An Introduction to Hierarchical Modeling
by abeppu on Thursday March 04, 2021 @01:38PM
(#26346302)
Though the visualization is cool here, I think this is actually not a good example. The final "hierarchical" model presented doesn't say anything about a relation between the coefficients for the different departments, so one can view this as really just having separate models, one for each department.
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.
Re:An Introduction to Hierarchical Modeling
by jaygray0919 on Friday March 05, 2021 @07:36AM
(#26356149)
Agree. The example is not a Class hierarchy - it is a group with different coefficients. But the concept is useful, and the related visualization (for Class comparisons) would be useful.
Re:An Introduction to Hierarchical Modeling
by gegtik on Thursday March 04, 2021 @04:26PM
(#26348601)
I don't quite understand what's hierarchical about this example. seems like a few different mutually exclusive segments that can then be independently analysed?
Re:An Introduction to Hierarchical Modeling
by wodenokoto on Thursday March 04, 2021 @01:51PM
(#26346490)
Then for any given data point, salary for all other departments will be zero (dep1salery = dep2salary = ... = 0) so data for each department will become separate and you will in effect have i number of different models, although they all share the same bias term / intersect.
Re:An Introduction to Hierarchical Modeling
by plouffy on Thursday March 04, 2021 @02:03PM
(#26346637)
You could argue that a hierarchical model is already multiple models. If each department has a dummy variable then they wouldn't share the same intersect. The only difference is how you interpret that intercept. The department intercept would now not be the salary of an individual with 0 experience, but the difference between the salary of an individual with 0 experience in a department compared to the all other employees with 0 experience.
Re:An Introduction to Hierarchical Modeling
by wodenokoto on Friday March 05, 2021 @08:49AM
(#26356813)
Well, two things here:
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,
Re:An Introduction to Hierarchical Modeling
by causalmodels on Thursday March 04, 2021 @02:04PM
(#26346649)
Probabilistic machine learning is still machine learning. If you're referring to one of the popular tensor frameworks, pretty much all of them have probabilistic features or add-ons [1][2][3]. There are also frameworks developed specifically for this kind of work [4][5].
This [6] is a more in depth look at hierarchical / multi-level modeling. The prediction section [7] specifically goes over cross validation and inference.
Re:An Introduction to Hierarchical Modeling
by RA_Fisher on Thursday March 04, 2021 @10:29PM
(#26352242)
ML are algos not models (estimators to be precise). This model could be fit by many of them. However, fitting the model directly with the linear model will be advantageous for computational reasons.
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.
https://statmodeling.stat.columbia.edu/2018/03/15/need-16-ti...
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:
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,
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.
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?