tansey / gfl Goto Github PK
View Code? Open in Web Editor NEWA fast and flexible algorithm for solving the graph-fused lasso
License: GNU Lesser General Public License v3.0
A fast and flexible algorithm for solving the graph-fused lasso
License: GNU Lesser General Public License v3.0
The README mentions a maketrails
script to be used for preprocessing but the repo contains no such script. Can that be added?
thank you
Hi,
I have tried running the example data but I found error when I used "solve_gfl()". Please find the error below.
>>> solve_gfl(y,edges) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-x86_64/egg/pygfl/easy.py", line 35, in solve_gfl File "build/bdist.linux-x86_64/egg/pygfl/trails.py", line 357, in decompose_graph AttributeError: 'DegreeView' object has no attribute 'iteritems'
Thank you
Got an error while running solve_gfl in easy.py using python2.
Error code: "NetworkXError: Frozen graph can't be modified" (File "trail.py", line 391, in decompose_graph)
And I have found the graph producing the error:
Node number 36,
edges:
0 6
0 8
0 9
1 7
1 10
1 11
2 4
2 5
3 4
3 5
3 6
3 7
8 12
8 14
9 13
9 15
10 16
11 17
12 13
12 18
13 19
14 20
15 21
16 24
16 26
17 25
17 27
18 22
19 23
20 22
21 23
24 28
25 29
26 30
27 31
28 32
28 34
29 33
29 35
30 32
31 33
codes to reproduce the error:
from pygfl.easy import solve_gfl
import numpy as np
a = np.random.rand(36)
edges = np.loadtxt('edges.txt')
solve_gfl(a,edges)
The errror only occurs in python2. No error is reported while utilizing python3, which is strange.
I am trying to make my project compatible with python3. But it's huge and managed by many co-workers.
Could you help to fix this error? I am doubting that there is something different in networkx between python2 and python3.
Thank you very much!
I installed from source locally (linux machine):
python setup.py build
python setup.py install --user
and when I try to import pygfl
I get the following error:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-6c0addf780fb> in <module>()
----> 1 import pygfl
build/bdist.linux-x86_64/egg/pygfl/__init__.py in <module>()
build/bdist.linux-x86_64/egg/pygfl/easy.py in <module>()
build/bdist.linux-x86_64/egg/pygfl/solver.py in <module>()
/usr/lib/python2.7/ctypes/__init__.pyc in LoadLibrary(self, name)
438
439 def LoadLibrary(self, name):
--> 440 return self._dlltype(name)
441
442 cdll = LibraryLoader(CDLL)
/usr/lib/python2.7/ctypes/__init__.pyc in __init__(self, name, mode, handle, use_errno, use_last_error)
360
361 if handle is None:
--> 362 self._handle = _dlopen(self._name, mode)
363 else:
364 self._handle = handle
OSError: libgraphfl.so: cannot open shared object file: No such file or directory
The same error occurs when I pip install on a Mac machine
I am looking for python code for fused lasso for logistic regression for Windows
may you recommend one?
Hi, thank you for sharing the codes. It is very helpful.
I am wondering if it's possible to add weigths on edges, so that the loss function will be
L(y,\beta)+\sum_{i<j}A_{ij}|\beta_i-\beta_j|
Can this project solve it with a few modifications?
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.