Skip to content

Commit 4fd4573

Browse files
committed
Updated installation guide with conda
1 parent b00260f commit 4fd4573

File tree

4 files changed

+1368
-1345
lines changed

4 files changed

+1368
-1345
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,60 +9,58 @@ The library itself has already included a set of popular methods and datasets re
99
- Built-in methods: [node2vec](https://github.com/aditya-grover/node2vec), [struc2vec](https://github.com/leoribeiro/struc2vec), [GraphWave](https://github.com/snap-stanford/graphwave), [xNetMF](https://github.com/GemsLab/REGAL), [role2vec](https://github.com/benedekrozemberczki/role2vec), [DRNE](https://github.com/tadpole/DRNE), [MultiLENS](https://github.com/GemsLab/MultiLENS), [RiWalk](github.com/maxuewei2/RiWalk), [SEGK](https://github.com/giannisnik/segk), (more methods to add in the near future)
1010

1111
- Built-in datasets:
12-
13-
| Dataset | # Nodes | # Edges |
14-
| ------------------------------------------------------------ | ------- | ------- |
15-
| [BlogCatalog](http://snap.stanford.edu/node2vec/) | 10,312 | 333,983 |
16-
| [Facebook](http://snap.stanford.edu/data/egonets-Facebook.html) | 4,039 | 88,234 |
12+
13+
| Dataset | # Nodes | # Edges |
14+
| ---------------------------------------------------------------------------------------- | ------- | ------- |
15+
| [BlogCatalog](http://snap.stanford.edu/node2vec/) | 10,312 | 333,983 |
16+
| [Facebook](http://snap.stanford.edu/data/egonets-Facebook.html) | 4,039 | 88,234 |
1717
| [ICEWS](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/QI2T9A) | 1,255 | 1,414 |
18-
| [PPI](snap.stanford.edu/graphsage/) | 56,944 | 818,786 |
19-
| [BR air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 131 | 1,038 |
20-
| [EU air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 399 | 5,995 |
21-
| [US air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 1,190 | 13,599 |
22-
| [DD6](https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets) | 4,152 | 20,640 |
23-
| Synthetic Datasets | | |
18+
| [PPI](snap.stanford.edu/graphsage/) | 56,944 | 818,786 |
19+
| [BR air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 131 | 1,038 |
20+
| [EU air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 399 | 5,995 |
21+
| [US air-traffic](https://github.com/leoribeiro/struc2vec/tree/master/graph) | 1,190 | 13,599 |
22+
| [DD6](https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets) | 4,152 | 20,640 |
23+
| Synthetic Datasets | | |
2424

25-
The library requires *Python 3.7* for best usage. In *Python 3.8*, the Tensorflow 1.14.0 used in DRNE might not be successfully installed.
25+
The library requires *Python 3.6.2 for best usage. In *Python 3.8*, the Tensorflow 1.14.0 used in DRNE might not be successfully installed.
2626

2727
## Installation and Usage
2828

2929
Make sure you are using *Python 3.6+* for all below!
3030

31-
1. First, creat a virtual environment and activate the virtual environment.
32-
31+
1. First, creat a virtual environment and activate the virtual environment using conda
32+
3333
```bash
34-
python3 -m venv <VENV_NAME>
35-
source <VENV_NAME>/bin/activate
34+
conda create -n "<VENV_NAME>" python=3.6.2 ipython
35+
conda activate <VENV_NAME>
3636
```
3737

3838
2. Change directory to the `StrucEmbeddingLibrary` and install the dependencies
39-
39+
4040
```bash
4141
(<VENV_NAME>) cd StrucEmbeddingLibrary
4242
(<VENV_NAME>) python3 -m pip install -r requirements.txt --no-cache-dir
4343
```
4444

4545
3. Install the `SEMB` package
46-
46+
4747
```bash
4848
(<VENV_NAME>) cd StrucEmbeddingLibrary
4949
(<VENV_NAME>) python3 setup.py install
5050
```
51-
51+
5252
After installation, we highly recommend you go through our [Tutorial](https://github.com/GemsLab/StrucEmbeddingLibrary/blob/master/Tutorial.ipynb) to see how SEMB library works.
5353

5454
4. To enable using the jupyter notebook, do the following,
55-
55+
5656
```bash
5757
(<VENV_NAME>) python3 -m pip install ipykernel --no-cache-dir
5858
(<VENV_NAME>) python3 -m ipykernel install --name=<VENV_NAME>
5959
(<VENV_NAME>) jupyter notebook
6060
```
61-
61+
6262
Choose `<VENV_NAME>` at the top right corner of the page when creating a new jupyter notebook / running the tutorial notebook.
6363

64-
65-
6664
## Extending SEMB
6765

6866
First make sure the `semb` library is installed.
@@ -94,6 +92,7 @@ Currently, SEMB only supports embedding and evaluation on *undirected* and *unwe
9492
- Now the method is load-able by the main client program that uses `semb`!
9593

9694
### Note
95+
9796
For both `dataset` and `method` extensions, make sure the `get_id()` to be overridden and returns the same id as your chosen id in your package name.
9897

9998
### Contact

Tutorial.ipynb

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,30 @@
99
},
1010
{
1111
"cell_type": "code",
12-
"execution_count": 1,
12+
"execution_count": 6,
13+
"metadata": {},
14+
"outputs": [
15+
{
16+
"name": "stdout",
17+
"output_type": "stream",
18+
"text": [
19+
"/Users/mark/GoogleDrive/UM/S4/GEMS/Git/SEMB_env/bin/python3\n",
20+
"3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) \n",
21+
"[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]\n",
22+
"sys.version_info(major=3, minor=6, micro=2, releaselevel='final', serial=0)\n"
23+
]
24+
}
25+
],
26+
"source": [
27+
"import sys\n",
28+
"print(sys.executable)\n",
29+
"print(sys.version)\n",
30+
"print(sys.version_info)"
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": 7,
1336
"metadata": {},
1437
"outputs": [
1538
{
@@ -58,7 +81,7 @@
5881
},
5982
{
6083
"cell_type": "code",
61-
"execution_count": 2,
84+
"execution_count": 8,
6285
"metadata": {},
6386
"outputs": [],
6487
"source": [
@@ -76,7 +99,7 @@
7699
},
77100
{
78101
"cell_type": "code",
79-
"execution_count": 3,
102+
"execution_count": 9,
80103
"metadata": {},
81104
"outputs": [
82105
{
@@ -87,7 +110,7 @@
87110
" DatasetInfo(name='2 - US', description='European airport sample data', src_url='/Users/mark/GoogleDrive/UM/S4/GEMS/Git/StrucEmbeddingLibrary/semb/datasets/airports/../../../sample-data/Airports/airport_US/usa-airports.edgelist', label_url='/Users/mark/GoogleDrive/UM/S4/GEMS/Git/StrucEmbeddingLibrary/semb/datasets/airports/../../../sample-data/Airports/airport_US/airport_USA_label.txt')]"
88111
]
89112
},
90-
"execution_count": 3,
113+
"execution_count": 9,
91114
"metadata": {},
92115
"output_type": "execute_result"
93116
}
@@ -105,7 +128,7 @@
105128
},
106129
{
107130
"cell_type": "code",
108-
"execution_count": 4,
131+
"execution_count": 10,
109132
"metadata": {},
110133
"outputs": [],
111134
"source": [
@@ -121,16 +144,16 @@
121144
},
122145
{
123146
"cell_type": "code",
124-
"execution_count": 5,
147+
"execution_count": 11,
125148
"metadata": {},
126149
"outputs": [
127150
{
128151
"data": {
129152
"text/plain": [
130-
"<networkx.classes.graph.Graph at 0x7f879c8b1d68>"
153+
"<networkx.classes.graph.Graph at 0x7f9648fb0f60>"
131154
]
132155
},
133-
"execution_count": 5,
156+
"execution_count": 11,
134157
"metadata": {},
135158
"output_type": "execute_result"
136159
}
@@ -155,7 +178,7 @@
155178
},
156179
{
157180
"cell_type": "code",
158-
"execution_count": 6,
181+
"execution_count": 12,
159182
"metadata": {},
160183
"outputs": [
161184
{

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ gensim==3.7.1
1010
tqdm==4.32.2
1111
texttable==1.6.2
1212
fastdtw==0.3.4
13-
sparsesvd==0.2.2
1413
grakel==0.1a6
1514
scikit-learn==0.21.3
1615
absl-py==0.11.0
@@ -38,11 +37,13 @@ protobuf==3.14.0
3837
pyparsing==2.4.7
3938
python-dateutil==2.8.1
4039
pytz==2020.4
41-
semb==0.0.1
4240
six==1.15.0
4341
smart-open==4.0.1
4442
termcolor==1.1.0
4543
threadpoolctl==2.1.0
4644
Werkzeug==1.0.1
4745
wrapt==1.12.1
48-
zipp==3.4.0
46+
zipp==3.4.0
47+
sparsesvd~=0.2.0
48+
requests~=2.27.1
49+
requests-file~=1.5.1

0 commit comments

Comments
 (0)