GithubHelp home page GithubHelp logo

fdtomasi / regain Goto Github PK

View Code? Open in Web Editor NEW
28.0 6.0 12.0 53.81 MB

REGAIN (Regularised Graphical Inference)

License: BSD 3-Clause "New" or "Revised" License

Python 4.82% Jupyter Notebook 95.00% MATLAB 0.17% Shell 0.01% Batchfile 0.01%
scikit-learn graphical-models network-inference machine-learning latent-variables time-series

regain's People

Contributors

fdtomasi avatar samuelefiorini avatar veronicatozzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

regain's Issues

Clean `notebooks` folder

Clean notebooks folder. There are many notebooks and pickles which are not needed anymore, or that can be put in specific folders, along with experimental notebooks.

Error in make_dataset

Expected Behavior

New data set should be created

Actual Behavior

An error occurred

Steps to Reproduce the Problem

  1. pip install regain
  2. pip install all dependencies
  3. run Quickstart
  4. error in gaussian.py line 393: "assert (is_pos_def(theta_observed))"

error message

Datasets NoModuleFound Error

Hello!

I have just found that it is not possible to generate synthetic data using your functionalities in regain/datasets/base.py

The reason is a recent sklearn update of datasets module, you might want to change line 36 in the file above as following from sklearn.utils import Bunch

I'm interested in your graphical lasso with latent variables, would be cool if you can check this issue.
Currently, I have the following error when try to reproduce your example:

`--------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from regain.datasets import datasets

~/opt/anaconda3/envs/gglasso/lib/python3.8/site-packages/regain/datasets/init.py in
28 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---> 30 from .base import make_dataset

~/opt/anaconda3/envs/gglasso/lib/python3.8/site-packages/regain/datasets/base.py in
34
35 import numpy as np
---> 36 from sklearn.datasets.base import Bunch
37
38 from .gaussian import (

ModuleNotFoundError: No module named 'sklearn.datasets.base'`

Upload to pip does not work for python 2

pip includes deprecated version of the repo as the script to upload to pip does not work with python 2 (currently supported from the package).
As Python 2 is deprecated, we'll remove Py2 support, which should also fix this error.

Attempting to import regain.linear_model raises error

Describe the bug
Attempting to import regain.linear_model raises error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...\lib\site-packages\regain\linear_model\__init__.py", line 31, in <module>
    from .group_lasso_overlap_ import GroupLassoOverlap, GroupLassoOverlapClassifier
  File "...\lib\site-packages\regain\linear_model\group_lasso_overlap_.py", line 39, in <module>
    from sklearn.linear_model.base import LinearClassifierMixin, LinearModel, _pre_fit
ModuleNotFoundError: No module named 'sklearn.linear_model.base'

To Reproduce
Install regain and scikit-learn >=1.0.2 (or possibly earlier version)
Attempt to import regain.linear_model

Expected behavior
No error

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: N/A
  • Version: regain v0.3.3; scikit-learn v1.0.2

Ising `make_dataset` does not terminate

Expected Behavior

Create Ising dataset.

Actual Behavior

Function does not terminate, hence we cannot add it in the tests.

Steps to Reproduce the Problem

from regain import datasets
datasets.make_dataset(distribution='ising')

Module 'collections' has no attribute 'Mapping' error with Python 3.10.10

Attempting to import GraphicalLasso (or any other module) from regain raises error:

from GL import GraphicalLasso
Results in the Module 'collections' has no attribute 'Mapping' error as in the screenshot below:

Screenshots
image

Getting this error when executing in AWS SageMaker notebook (Amazon Linux 2) with Python 3.10.10 | packaged by conda-forge

Parameter `over_relax` is never used in some classes.

I have noticed the parameter over_relax in classes LatentGraphLasso, LatentTimeGraphLasso, and TimeGraphLasso cannot be changed. It will always be 1.0 (as specified in ancestor class GraphLasso). Is this a bug ?

How to use TimeGraphicalLasso on a dataset where you only have one observation for each time point

When I try to use the TimeGraphicalLasso function on a dataset where each time point only has one sample, the function returns only diagonal matrices.

According to the authors who came up with Time-Varying Graphical Lasso (https://dl.acm.org/doi/pdf/10.1145/3097983.3098037), a Time-Varying Graphical Lasso should be "able to estimate a network at a time where there is only one observation."

Is your implementation of this function not designed to handle the extreme case where there is only one observation for each time-point? If it isn't, then it would be nice if you were to adjust this function for this extreme case. If not, are there any recommendations you can give for how to get your implementation of the time-varying Graphical Lasso to work on a dataset where there is only one observation per time point?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.