You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+36-11Lines changed: 36 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,31 +2,56 @@
2
2
3
3
The repository contains source files for Node Immunization algorithms. Given a directed network and a set of seed nodes, the problem is to select k nodes which to block/immunize so that the expected influence spread in the network is minimized. Simulations performed under Independent Cascade model.
4
4
5
+
Supported algorithms:
6
+
- Degree : degree heuristic
7
+
- Dom : DAVA, dominator tree based algorithm
8
+
- NetShape : Convex optimization of a hazard matrix
9
+
- NetShield : Minimization of a shield value
10
+
- Random : Random selection of blocked nodes
11
+
5
12
# Requirements
6
13
7
-
The repository is provided by the pipenv file that includes necessary requirements.
14
+
Required libraries: NetworkX, SciPy, NumPy.
15
+
```bash
16
+
pip3 install networkx scipy numpy
17
+
```
18
+
19
+
The repository is provided by Pipfile.
8
20
9
21
# Data
10
22
11
-
All algorithms require two files with a network and a seed set, in pickled NetworkX format for the network and csv file with node ids for seeds. Generator class generate random networks according to several growth models.
23
+
All algorithms require two files with a network and a seed set, in pickled NetworkX format for the network and csv file with node ids for seeds. Graphs should have 'graph_id' attribute.
24
+
25
+
For synthetic data, Generator class is used to generate random networks according to several growth models. Real-world networks are not included in the repository.
12
26
13
27
# Usage
14
28
29
+
## Graph Generation
30
+
31
+
```python
32
+
python3 Generator.py graph_type [-p other params]
33
+
```
34
+
35
+
For example:
36
+
```python
37
+
python3 Generator.py grid a.pkl b.csv -p n 10
38
+
```
39
+
40
+
## Benchmarking
41
+
15
42
The script run_solver.py applies an algorithm to a graph with seeds, and runs simulations for the objective evaluations (number of saved nodes in the graph).
16
43
17
44
Minimum usage:
18
-
'''
45
+
```python
19
46
python3 run_solver.py path_to_graph path_to_seeds k algorithm_name
20
-
'''
47
+
```
21
48
22
-
'python3 run_solver.py' for other parameters.
49
+
For other parameters run:
50
+
```python
51
+
python3 run_solver.py -h
52
+
```
23
53
24
-
Supported algorithms:
25
-
- Degree : degree heuristic
26
-
- Dom : DAVA, dominator tree based algorithm
27
-
- NetShape : Convex optimization of a hazard matrix
28
-
- NetShield : Minimization of a shield value
29
-
- Random : Random selection of blocked nodes
54
+
If using pipenv, then all commands should precede by `pipenv run`.
0 commit comments