pygmem is a Python module for generalized (non linear) mixed effect models for statistical learning tasks built on top of pytorch. There are no inference of the variance like in more statistically oriented libraries.
The library is written with pytorch and there is only one type of group parametring (individualized prediction regarding one type of group). It's designed for larger dataset usecases (Netflix, LinkedIn) compared to more statistical regression approaches. There is an option for non-linear cases (input-encoder, for images for example, and a decoder). For those non linear models, the mixed-effect are learned on a intermediary layer, where the individualised parameters are defined.
You can also choose the type of regression you want (Gaussian, Poisson, Binary prediction) by choosing an ouput function theta.
It is currently maintained by mcordier.
Website: To Come
scikit-learn requires:
- Python (>= 3.7)
- NumPy
- SciPy
- PyTorch
- Pandas
- Matplotlib
- Tqdm
PyGmem is requiring Python |PythonMinVersion| at minimum
The easiest way to install PyGmem is using pip. Go to the pygmem directory and run
pip install .
For developpers, you can run
pip install -e .
- Official source code repo: https://github.com/mcordier/pygmem
- Introduction to Linear Mixed Effect Models: https://en.wikipedia.org/wiki/Generalized_linear_mixed_model
The project was started in 2020. At the moment, only a single group of random effects is supported
To get introduced to this library, I recommend to first look at the script examples in the examples folder. The way you fit a GMEM model is similar to other machine learning libraries. There are three main type of classes in this library. First, the GMEM model itself, available at the higher level. Then, there are the network classes, which are neural networks set up with pytorch, used by the GMEM model. Then the datasets models is used for the data ingestion in pytorch.
If you have any interest, questions or request concerning this python library, you can contact me at matt.cordier.95@gmail.com.
If you use PyGmem in a scientific publication, we would appreciate citations.
