恢复(正则图推断)

regain的Python项目详细描述


develstatcovdevellicencePyPICondaPython27Python34Requirements Status

重新获得

考虑潜在变量影响的多时间戳正则化图推理。 它继承了scikit-learn包的功能。

入门

依赖性

REGAIN需要:

  • Python(>;=2.7或>;=3.5)
  • 纽比(>;=1.8.2)
  • scikit学习(>;=0.17)

您可以通过运行以下命令安装(必需的)依赖项:

pip install -r requirements.txt

要通过高斯过程优化使用参数选择,需要skopt

安装

安装retain的最简单方法是使用pip

pip install regain

conda

conda install -c fdtomasi regain

如果您想从源代码安装,或者想为项目做出贡献(例如,通过github发送pull请求),请继续阅读。在github中克隆存储库并将其添加到$pythonpath中。

git clone https://github.com/fdtomasi/regain.git
cd regain
python setup.py develop

快速启动

如何使用ltgl的简单示例。

importnumpyasnpfromregain.covarianceimportLatentTimeGraphLassofromregain.datasetsimportmake_datasetfromregain.utilsimporterror_norm_timenp.random.seed(42)data=make_dataset(n_dim_lat=1,n_dim_obs=10)X=data.datatheta=data.thetasmdl=LatentTimeGraphLasso(max_iter=50).fit(X)print("Error: %.2f"%error_norm_time(theta,mdl.precision_))

注意,LatentTimeGraphLasso的输入是一个形状为(n_times, n_samples, n_dimensions)的三维矩阵。 如果您只有一次(n_times = 1),请确保在使用LatentTimeGraphLasso之前使用X = X.reshape(1, *X.shape),或者,也可以使用LatentGraphLasso

引文

REGAIN出现在以下两个出版物中。 对于LatentTimeGraphLasso请使用

@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},
}

以及用于TimeGraphLassoForwardBackwardplase

@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.}}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
decimal Java BigDecimal除法并获取N位数字   以不同的时间间隔重新启动Java计时器   java JFreeChart空指针问题   java Maven:通过cmd使用Install命令获取编译错误   计算CSV文件中行数的java内置方法?   在WorldWind Java/JOGL中使用自定义着色器   JavaSpringMVC安全性甚至在第一步都不起作用   java面板无法打开?   java抓住可丢弃的东西是一种不好的做法吗?   java如何安排JComboBox项   windows使用java设置系统时间的毫秒数   java如何检查ISO日期字符串中是否存在偏移量   java如何获取JPanel中鼠标指针的位置(无需任何鼠标操作)?   java如何获取log4j2。从pom读取文件名的属性文件。springboot中的xml   java编写二叉搜索树的插入方法   Java泛型覆盖静态方法解决方案   java在下面的代码中,语句SumDif()的作用是什么。run();意思是   java与集合对象有关系的类是否与集合的元素有关系?   java一旦恢复了用户的图像,如何将其保存在Drawable中