REGAIN (Regularised Graph Inference)
Project description
regain
Regularised graph inference across multiple time stamps, considering the influence of latent variables. It inherits functionalities from the scikit-learn package.
Getting started
Installation
The simplest way to install regain is using pip
pip install regain
or conda
conda install -c fdtomasi regain
To install from source (for development or to contribute via pull requests):
git clone https://github.com/fdtomasi/regain.git
cd regain
pip install -e .
For Gaussian-process based parameter selection, skopt is also required.
Quickstart
A simple example for how to use LTGL.
import numpy as np
from regain.covariance import LatentTimeGraphicalLasso
from regain.datasets import make_dataset
from regain.utils import error_norm_time
np.random.seed(42)
data = make_dataset(n_dim_lat=1, n_dim_obs=3)
X = data.X
y = data.y
theta = data.thetas
mdl = LatentTimeGraphicalLasso(max_iter=50).fit(X, y)
print("Error: %.2f" % error_norm_time(theta, mdl.precision_))
IMPORTANT
We moved the API to be more consistent with scikit-learn.
Now the input of LatentTimeGraphicalLasso is a two-dimensional matrix X with shape (n_samples, n_dimensions), where the belonging of samples to a different index (for example, a different time point) is indicated in y.
Citation
REGAIN appeared in the following two publications.
For the LatentTimeGraphicalLasso please use
@inproceedings{Tomasi:2018:LVT:3219819.3220121,
author = {Tomasi, Federico and Tozzo, Veronica and Salzo, Saverio and Verri, Alessandro},
title = {Latent Variable Time-varying Network Inference},
booktitle = {Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery \&\#38; Data Mining},
series = {KDD '18},
year = {2018},
isbn = {978-1-4503-5552-0},
location = {London, United Kingdom},
pages = {2338--2346},
numpages = {9},
url = {http://doi.acm.org/10.1145/3219819.3220121},
doi = {10.1145/3219819.3220121},
acmid = {3220121},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {convex optimization, graphical models, latent variables, network inference, time-series},
}
and for the TimeGraphicalLassoForwardBackward plase use
@InProceedings{pmlr-v72-tomasi18a,
title = {Forward-Backward Splitting for Time-Varying Graphical Models},
author = {Tomasi, Federico and Tozzo, Veronica and Verri, Alessandro and Salzo, Saverio},
booktitle = {Proceedings of the Ninth International Conference on Probabilistic Graphical Models},
pages = {475--486},
year = {2018},
editor = {Kratochv\'{i}l, V\'{a}clav and Studen\'{y}, Milan},
volume = {72},
series = {Proceedings of Machine Learning Research},
address = {Prague, Czech Republic},
month = {11--14 Sep},
publisher = {PMLR},
pdf = {http://proceedings.mlr.press/v72/tomasi18a/tomasi18a.pdf},
url = {http://proceedings.mlr.press/v72/tomasi18a.html},
abstract = {Gaussian graphical models have received much attention in the last years, due to their flexibility and expression power. However, the optimisation of such complex models suffer from computational issues both in terms of convergence rates and memory requirements. Here, we present a forward-backward splitting (FBS) procedure for Gaussian graphical modelling of multivariate time-series which relies on recent theoretical studies ensuring convergence under mild assumptions. Our experiments show that a FBS-based implementation achieves, with very fast convergence rates, optimal results with respect to ground truth and standard methods for dynamical network inference. Optimisation algorithms which are usually exploited for network inference suffer from drawbacks when considering large sets of unknowns. Particularly for increasing data sets and model complexity, we argue for the use of fast and theoretically sound optimisation algorithms to be significant to the graphical modelling community.}
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regain-0.4.1.tar.gz.
File metadata
- Download URL: regain-0.4.1.tar.gz
- Upload date:
- Size: 108.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee95f53ddbdbbf12fd11e03f2b5da72373fafc38ae29911513af7fe043062ed1
|
|
| MD5 |
ed4f11c7bac253200c716526b04b0ac6
|
|
| BLAKE2b-256 |
594677430cd6b7ff50d8f2ddca37d7f1e1fc1a59506548fdf5b62a0f14bd77ae
|
Provenance
The following attestation bundles were made for regain-0.4.1.tar.gz:
Publisher:
python-publish.yml on fdtomasi/regain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regain-0.4.1.tar.gz -
Subject digest:
ee95f53ddbdbbf12fd11e03f2b5da72373fafc38ae29911513af7fe043062ed1 - Sigstore transparency entry: 1633024164
- Sigstore integration time:
-
Permalink:
fdtomasi/regain@bb4666eec36bae12f60d8d1ce9205895492ac8af -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/fdtomasi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bb4666eec36bae12f60d8d1ce9205895492ac8af -
Trigger Event:
release
-
Statement type:
File details
Details for the file regain-0.4.1-py2.py3-none-any.whl.
File metadata
- Download URL: regain-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 197.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a4a69c9b050caa143febdcfcecde6d52dde761b50c2abd4d4c2857c02c0e104
|
|
| MD5 |
d2f9bee7a572cd8fbcd79062c07ad61e
|
|
| BLAKE2b-256 |
9e7c3a006bc2a0b6797e5d2aeed2a6fd831c2435ba265f6de1f19cab8f09726a
|
Provenance
The following attestation bundles were made for regain-0.4.1-py2.py3-none-any.whl:
Publisher:
python-publish.yml on fdtomasi/regain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
regain-0.4.1-py2.py3-none-any.whl -
Subject digest:
7a4a69c9b050caa143febdcfcecde6d52dde761b50c2abd4d4c2857c02c0e104 - Sigstore transparency entry: 1633024176
- Sigstore integration time:
-
Permalink:
fdtomasi/regain@bb4666eec36bae12f60d8d1ce9205895492ac8af -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/fdtomasi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bb4666eec36bae12f60d8d1ce9205895492ac8af -
Trigger Event:
release
-
Statement type: