Closed OliverFishCode closed 4 years ago
This sounds like a good idea, but I'm not exactly sure what you mean. A great thing to contribute if you have the time!
This is how is commonly implimented in R : https://www.rdocumentation.org/packages/randomForest/versions/4.6-14/topics/partialPlot
This is the implementation in sci-kit learn: https://scikit-learn.org/stable/auto_examples/ensemble/plot_partial_dependence.html
I'm not sure how it would work incorporating random effects, but I'm sure it would be similar to BLUP (best linear unbiased predictor) or no BLUP in GLMM (generalized linear mixed models). I may take a look at this sometime ( my plates a little full), but I am not sure if the math and code is beyond my ability ( I have a solid case of imposter syndrome).
@OliverFishCode I am closing this for the time being. Please see the MERF example notebook of how to do this by accessing the internal trained RF. This does not however address doing this WITH the random effect applied as well. If you want to do that I think you would have to do it per cluster.... Unclear.
It would be nice if there was a function for creating partial dependency plot data or plots. This would help with translating information to consumers and clients