Fast inference over mean and covariance parameters for Generalised Linear Mixed Models
Project description
glimix-core
Fast inference over mean and covariance parameters for Generalised Linear Mixed Models.
It implements the mathematical tricks of FaST-LMM for the special case of Linear Mixed Models with a linear covariance matrix and provides an interface to perform inference over millions of covariates in seconds. The Generalised Linear Mixed Model inference is implemented via Expectation Propagation and also makes use of several mathematical tricks to handle large data sets with thousands of samples and millions of covariates.
Install
There are two main ways of installing it. Via pip:
pip install glimix-core
Or via conda:
conda install -c conda-forge glimix-core
Running the tests
After installation, you can test it
python -c "import glimix_core; glimix_core.test()"
as long as you have pytest.
Usage
Here it is a very simple example to get you started:
>>> from numpy import array, ones
>>> from numpy_sugar.linalg import economic_qs_linear
>>> from glimix_core.lmm import LMM
>>>
>>> X = array([[1, 2], [3, -1], [1.1, 0.5], [0.5, -0.4]], float)
>>> QS = economic_qs_linear(X, False)
>>> X = ones((4, 1))
>>> y = array([-1, 2, 0.3, 0.5])
>>> lmm = LMM(y, X, QS)
>>> lmm.fit(verbose=False)
>>> lmm.lml()
-2.2726234086180557
We also provide an extensive documentation about the library.
Authors
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file glimix-core-3.1.13.tar.gz
.
File metadata
- Download URL: glimix-core-3.1.13.tar.gz
- Upload date:
- Size: 70.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a382a0f6de89c96b474f4ede9a8549539c9b65d2f1b6877dca4f0738d2d4055d |
|
MD5 | ac6696edb4abb6c30810987493fc8c20 |
|
BLAKE2b-256 | b62ac77df3eff97040fdd82bde3dac78c8130823230e56fce7d3ef86b09a17a9 |
File details
Details for the file glimix_core-3.1.13-py3-none-any.whl
.
File metadata
- Download URL: glimix_core-3.1.13-py3-none-any.whl
- Upload date:
- Size: 100.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b68d91fffb2eeb7366301cec641a7796403ad912257104d64839b6680b5db3d6 |
|
MD5 | 505555d562969f4fe2a179ca4f87e0b5 |
|
BLAKE2b-256 | 29af70e95c605d0f284c25b8e4f3fdb05b04459d07ae1e04ffd0285a29c34165 |