Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
610a7b8
Add .gitignore
Aug 28, 2017
4d3bbc6
Remove beta from sweep_opt arguments
Aug 28, 2017
12919f2
Move sqrtm to graph_signal_proc.py
Aug 28, 2017
f67c75c
Add info to dataset.py
Aug 28, 2017
dce1911
Clean optimal_cut imports
Aug 28, 2017
6771cd2
Remove unintentional comment
Aug 28, 2017
2c5b1b9
Clean graph_signal_proc imports
Aug 28, 2017
dd5b6e5
Fix some doc in graph_signal_proc
Aug 28, 2017
311c3d2
Fix incoherent use of arg N of graph_low_pass
Aug 28, 2017
e9c6ed5
Update graph_low_pass and graph_wavelets
Aug 29, 2017
31f96af
Fix graph_fourier and graph_fourier_inverse
Aug 29, 2017
4a07252
Add comment to Hammond's transform and inverse
Aug 30, 2017
dcbd242
Update comments in partitions_level_rec
Aug 30, 2017
5f2b1e9
Remove create_linked_list
Aug 30, 2017
08b5d98
Clean the sweep function
Sep 3, 2017
c748441
Remove arg in graph_low_pass
Sep 4, 2017
9d0b9bf
Remove for loop in graph_low_pass
Sep 4, 2017
d5eec50
Remove for loop in graph_wavelets
Sep 4, 2017
1f91edb
Fix doc in lib/graph_signal_proc.py
Sep 4, 2017
2ec310c
Remove attributes from Node object
Sep 4, 2017
e7d271d
Clean code in graph_signal_proc.py
Sep 4, 2017
8ee07a8
Fix imports and style in lib/syn.py
Sep 4, 2017
78435e8
Add seeds as args for functions in syn.py
Sep 4, 2017
0797289
Set seeds in synthetic-data for reproducibility
Sep 4, 2017
68e83b0
Set seeds in synthetic-data for reproducibility
Sep 4, 2017
54b9117
Fix imports in lib/experiments.py
Sep 4, 2017
618481c
Remove not used vars in lib/experiments.py
Sep 4, 2017
cfbc481
Make graph_signal_proc and optimal_cut slimmer
Sep 4, 2017
78081b0
Make graph_signal_proc and optimal_cut slimmer
Sep 4, 2017
34de5f0
Fix imports in lib/static.py
Sep 4, 2017
bfc5150
Fix imports in lib/io.py and lib/vis.py
Sep 4, 2017
b474b9b
Make graph_low_pass and graph_wavelets faster
Sep 5, 2017
de743e1
Make hammond_wavelet_transform faster
Sep 6, 2017
6355f69
Fix error in hammond_wavelet_transform
Sep 6, 2017
8fced1e
Change code in hammond_wavelets_inverse
Sep 6, 2017
c7e5058
Clean compression-experiments.ipynb
Sep 7, 2017
5441ccb
Clean synthetic-data.ipynb
Sep 7, 2017
1491ec2
Review code for ratio_cut_hierarchy
Sep 7, 2017
fa099ac
Remove avgs and counts attributes from Node
Sep 7, 2017
6a1ff2b
Review code for Gavish tranform
Sep 8, 2017
e262f03
Remove unused functions from io.py
Sep 8, 2017
093c8bd
Review comments in io.py
Sep 8, 2017
4413882
Clean code for sweep_opt
Sep 8, 2017
e07d731
Update README.md
Sep 8, 2017
c4c764a
Make fast_cac faster
Sep 9, 2017
1b74e09
Merge branch 'slim' of https://github.com/diego-sacconi/sparse-wavele…
Sep 9, 2017
d878cbd
Review code for fast_cac
Sep 9, 2017
3c72ac4
Clean code in lib/syn.py
Sep 17, 2017
a5a5c61
Add DOCTEST to compression_experiment
Sep 24, 2017
53db7ee
Merge branch 'slim'
Sep 24, 2017
3836f1a
Update README.md
Sep 24, 2017
8c4ee9b
Update README.md
Sep 24, 2017
ba7bc19
Group notebooks in a folder
Sep 24, 2017
65cc719
Remove redundant notebook
Sep 24, 2017
141ade6
Update compression-experiments.ipynb and figures
Sep 26, 2017
7633db4
Add lib/__init__.py
Sep 26, 2017
0198bee
Add comments
Sep 26, 2017
8fa4d91
Rename lib/io to lib/io_utils and make minor changes
Sep 29, 2017
4104303
Add compatibility for NetworkX 2.0
Sep 29, 2017
4d6bc5f
Update lib/io_utils.py
Sep 29, 2017
310f9b1
Add Travis CI
Sep 29, 2017
2d03f97
Add info for testing
Sep 29, 2017
7d1f94b
Add support for Python 2.7
Sep 29, 2017
d25c5f3
Fix style and add comments to lib/vis.py
Oct 1, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Uncompressed data
data/

# Jupyter Notebook
.ipynb_checkpoints
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# After changing this file, check it on:
# http://lint.travis-ci.org

language: python

sudo: false

python:
- "3.4"

install:
- pip install -U pip
- pip install -U -r requirements.txt

script:
- tar xvzf data.tar.gz
- export PYTHONHASHSEED=0
- python -m doctest lib/experiments.py
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Implementation of graph wavelets via sparse cuts with some baselines, datasets and evaluation.

Evaluation is performed using python notebooks.
Evaluation is performed using IPython Notebook.

After code review some results may differ from those presented in the paper.

Scalability and approximation experiments:
-----------------------
Expand All @@ -12,10 +14,30 @@ Compression experiments:
-----------------------
https://nbviewer.jupyter.org/github/arleilps/sparse-wavelets/blob/master/compression-experiments.ipynb

Testing:
------
At the moment there is only one doctest in lib/experiments.py. To run the test
you should use python version 3.4 or 3.5, NetworkX 1.11 and set PYTHONHASHSEED=0.
This conditions are used to constrain the behaviour of the NetworkX function
fiedler_vector(). Once ready, enter the following command:
```
python -m doctest lib/experiments.py -v
```

List of supported Python versions:
------------------
<ul>
<li>2.7</li>
<li>3.4</li>
<li>3.5</li>
<li>3.6</li>
</ul>

<br />

For more details, see the paper:
[Graph Wavelets via Sparse Cuts ](http://arxiv.org/abs/1602.03320 "")
Arlei Silva, Xuan-Hong Dang, Prithwish Basu, Ambuj K Singh, Ananthram Swami
ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2016 (to appear).
ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2016.

Arlei Silva (arlei@cs.ucsb.edu)

780 changes: 0 additions & 780 deletions compression-experiments.ipynb

This file was deleted.

Binary file modified figs/compression_blog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/compression_blog2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/compression_human.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/compression_human2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/compression_small_traffic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/compression_traffic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figs/compression_wiki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/compression_wiki2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added lib/__init__.py
Empty file.
47 changes: 32 additions & 15 deletions lib/datasets.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,52 @@
r"""

#small traffic
#Speeds from traffic sensors
#vertices: 100
This module provides path to the dataset in data.
Each one is in a directory with the following structure:

datasetname
|- datasetname.data
|- datasetname.graph

datasetname.data has info about the graph signal.
Row format : "vertex_id, vertex_value"

datasetname.graph has info about edges.
Row format: "vertex_A, vertex_B[, edge_weight]"

"""


# Small traffic (weighted)
# Speeds from traffic sensors
# Vertices: 100

small_traffic = {}
small_traffic["path"] = "data/small_traffic/"

#Large traffic
#Speeds from traffic sensors
#vertices: 1923
# Large traffic (weigthed)
# Speeds from traffic sensors
# Vertices: 1923

traffic = {}
traffic["path"] = "data/traffic/"

#Human
#Gene expression data
#vertices: 3628
# Human (unweighted)
# Gene expression data
# Vertices: 3628

human = {}
human["path"] = "data/human/"

#Wikipedia data
#Number of views of wikipedia pages
#Vertices: 4871
# Wikipedia data (unweighted)
# Number of views of wikipedia pages
# Vertices: 4871

wiki = {}
wiki["path"] = "data/wiki/"

#Political blogs
#Link network of congressman's blogs with democrat/republican (0/1) as signal
#vertices: 1490
# Political blogs (unweighted)
# Link network of congressman's blogs with democrat/republican (0/1) as signal
# Vertices: 1490

polblogs = {}
polblogs["path"] = "data/polblogs/"
Loading