tvgl's Issues
'float' object cannot be interpreted as an index
python exampleTVGL.py
/mnt/work/tvgl/TVGL.py:4: SyntaxWarning: import * only allowed at module level
def TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty, verbose = False, eps = 3e-3, epsAbs = 1e-3, epsRel = 1e-3):
/mnt/work/tvgl/TVGL.py:4: SyntaxWarning: import * only allowed at module level
def TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty, verbose = False, eps = 3e-3, epsAbs = 1e-3, epsRel = 1e-3):
/mnt/work/tvgl/TVGL.py:4: SyntaxWarning: import * only allowed at module level
def TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty, verbose = False, eps = 3e-3, epsAbs = 1e-3, epsRel = 1e-3):
/mnt/work/tvgl/TVGL.py:4: SyntaxWarning: import * only allowed at module level
def TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty, verbose = False, eps = 3e-3, epsAbs = 1e-3, epsRel = 1e-3):
/mnt/work/tvgl/TVGL.py:4: SyntaxWarning: import * only allowed at module level
def TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty, verbose = False, eps = 3e-3, epsAbs = 1e-3, epsRel = 1e-3):
Use laplacian penalty function
3
lambda = 2.5, beta = 12
Distributed ADMM (1 processors)
Iteration 1
Traceback (most recent call last):
File "exampleTVGL.py", line 17, in
thetaSet = tvgl.TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty = 3, verbose=True)
File "/mnt/work/tvgl/TVGL.py", line 66, in TVGL
gvx.Solve(EpsAbs=epsAbs, EpsRel=epsRel, Verbose = verbose)
File "/mnt/work/tvgl/inferGraphLaplacian.py", line 147, in Solve
Verbose)
File "/mnt/work/tvgl/inferGraphLaplacian.py", line 437, in __SolveADMM
pool.map(ADMM_x, node_list)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
raise self._value
TypeError: 'float' object cannot be interpreted as an index
Name 'semidefinite' is not defined
Hi, I have imported the repository after the installation of cvxpy and all its dependencies, but when I try to run the exampleTVGL.py script it gives me the error:
Traceback (most recent call last):
File "exampleTVGL.py", line 17, in
thetaSet = tvgl.TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty = 3, verbose=True)
File "/home/brambilla/users/mattiagasparini/TVGL/TVGL.py", line 50, in TVGL
S = semidefinite(size, name='S')
NameError: name 'semidefinite' is not defined
I looked into all the files but I did not find the definiton of semidefinite function and also in the import there is no reference to these.
Moreover, it also raises the warning "SyntaxWarning: import * only allowed at module level", so the modules defined in the other scripts are not imported: could be that the problem?
Thank you,
Mattia
Why TypeError: 'float' object cannot be interpreted as an index ?
Macintosh# python financeInference.py
left timesteps: = 3
right timesteps: = 13
Use perturbation node penalty function
number of samples per time: 3
lambda = 0.18, beta = 13
analyze stock data
Distributed ADMM (4 processors)
Iteration 1
Traceback (most recent call last):
File "financeInference.py", line 417, in
gvx, empCov_set = solveProblem(gvx, index_penalty, cov_mode, alpha, beta, timesteps, timeShift, Cov_set, use_kernel, sigma, sample_set, empCov_set, eps_abs, eps_rel)
File "financeInference.py", line 327, in solveProblem
gvx.Solve(EpsAbs=eps_abs, EpsRel=eps_rel,Verbose=True,MaxIters=500)
File "/private/var/root/TVGL/PaperCode/inferGraphPN.py", line 147, in Solve
Verbose)
File "/private/var/root/TVGL/PaperCode/inferGraphPN.py", line 437, in __SolveADMM
pool.map(ADMM_x, node_list)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
TypeError: 'float' object cannot be interpreted as an index
Different optimal solution that cvx and ADMM reach
Recently I’m so fascinated about your paper in KDD2017, so I want to realize it by myself in MATLAB, and I also use cvx in MATLAB to solve the same problem, however, I found that the optimal solution these two ways get are different(the object value of cvx is a little bigger than ADMM)[the obejct value of python version is the same as matlab version], so I’m confused that ADMM method can reach the optimal point?
I’ll appreciate that you can reply my question.
Re-creating perturbed node detection for finance data
I'm attempting to re-create the result in Figure 5 of the paper (labeled "Perturbed Node Detection for Finance Data"), which shows a spike in the Temporal Deviation (TD) of the finance network on January 27th, 2010 (when Apple announced the iPad). Based on the comments in the code, it appears that the file PaperCode/financeInference.py
should re-create the result. But while the code generates a figure with a Temporal Deviation subplot (y-axis label:||\Theta_{i} - \Theta_{i-1}||_F
), there doesn't not appear to be a clear spike as in Figure 5:
Any ideas about this issue? Maybe I've misunderstood what Figure 5 was showing (e.g. it shows the TD ratio described in Section 6.1, instead of the TD).
Thanks!
Python 3: name 'semidefinite' is not defined
Hi David,
I tried to get TVGL running in Python 3.7 and conducted the steps:
- 2to3 applied to the whole directory
- install cvxpy 0.4 and snap
- in
cvxpy.atoms.log_sum_exp
i had to changescipy.misc
toscipy.special
for the import oflogsumexp
When running exampleTVGL.py I get the error
name 'semidefinite' is not defined
I do not quite understand where semidefinite
should come from, can you help me with the issue?
TypeError: 'NoneType' object has no attribute '__getitem__'
Use laplacian penalty function
3
lambda = 2.5, beta = 12
Distributed ADMM (4 processors)
Iteration 1
Traceback (most recent call last):
File "D:\workplace\eclipse_workplace\TVGL\exampleTVGL.py", line 20, in
thetaSet = tvgl.TVGL(data, lengthOfSlice, lamb, beta, indexOfPenalty = 3, verbose=True)
File "D:\workplace\eclipse_workplace\TVGL\TVGL.py", line 66, in TVGL
gvx.Solve(EpsAbs=epsAbs, EpsRel=epsRel, Verbose = verbose)
File "D:\workplace\eclipse_workplace\TVGL\inferGraphLaplacian.py", line 147, in Solve
Verbose)
File "D:\workplace\eclipse_workplace\TVGL\inferGraphLaplacian.py", line 437, in __SolveADMM
pool.map(ADMM_x, node_list)
File "D:\software\Anaconda2\Lib\multiprocessing\pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "D:\software\Anaconda2\Lib\multiprocessing\pool.py", line 567, in get
raise self._value
TypeError: 'NoneType' object has no attribute 'getitem'
I got this error on windows Pycharm, but this script works on Linux Pycharm. However, I got other error on Linux platform.
package version
Can you add the version of the dependent python packages in readme.md?
Understanding of raw finance data?
The data used in the script financeInference.py is 'finance.csv' file present in the folder Datasets. When I look at this data and compare it with the description provided in the documentation about it. I am a bit confused about it. As when I looked up the data on this website mentioned in the word document. There is no way I am able to relate to the numbers in the 'finance.csv' file. I have tried working out subtracting combination of columns but cannot match with the data used in the script. Can you please provide more detail regarding it.
Thanks you.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.