fabsig / GPBoost

Combining tree-boosting with Gaussian process and mixed effects models
Other
574 stars 46 forks source link

Where to find the random effects estimates? #45

Closed yingboli closed 2 years ago

yingboli commented 2 years ago

I was only able to find estimates of the prior variance of random effects, using gp_model.summary(). But for inference purpose, I would also like to see the estimated random effects, i.e, the estimates of b in the y = F(X) + Zb + e formula. How can I do that? Thank you.

fabsig commented 2 years ago

This is a prediction problem. You can obtain estimated / predicted random effects using the predict function as shown here: https://github.com/fabsig/GPBoost/blob/master/examples/python-guide/GPBoost_algorithm.py#L67. Just pass to the argument group_data_pred of the predict function your training grouping variable for which you want to obtain estimated / predicted random effects. The random_effect_mean in the output of the predict function are then the „estimated“ random effects.

yingboli commented 2 years ago

I see. Thank you.