fdtomasi / regain Goto Github PK
View Code? Open in Web Editor NEWREGAIN (Regularised Graphical Inference)
License: BSD 3-Clause "New" or "Revised" License
REGAIN (Regularised Graphical Inference)
License: BSD 3-Clause "New" or "Revised" License
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.
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'`
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.
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):
As sklearn
v0.20, we need to import GraphicalLasso
instead of GraphLasso
to avoid warnings.
At the same time, it does make sense to rename also our classes.
Create Ising dataset.
Function does not terminate, hence we cannot add it in the tests.
from regain import datasets
datasets.make_dataset(distribution='ising')
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:
Getting this error when executing in AWS SageMaker notebook (Amazon Linux 2) with Python 3.10.10 | packaged by conda-forge
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 ?
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.