Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamcorey/imp
AI Project 03
https://github.com/iamcorey/imp
Last synced: 7 days ago
JSON representation
AI Project 03
- Host: GitHub
- URL: https://github.com/iamcorey/imp
- Owner: iAmCorey
- License: mit
- Created: 2018-12-01T11:46:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T02:24:41.000Z (almost 6 years ago)
- Last Synced: 2023-11-07T17:58:53.940Z (about 1 year ago)
- Language: Python
- Size: 161 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IMP
# Overview
Influence Maximization Problem (IMP) is the problem of finding a small subset of nodes (referred to as seed set) in a social network that could maximize the spread of influence.
The influence spread is the expected number of nodes that are influenced by the nodes in the seed set in a cascade manner.# File Description
executable estimator - ISE.py
executable solver - IMP.py# Usage
## Task1: influence spread computation
`python ISE.py –i -s -m -t
is the absolute path of the social network file
is the absolute path of the seed set file
can only be IC or LT
e.g. `python ISE.py -i network.txt -s seeds.txt -m LT -t 120`
Output:
- The value of the estimated influence spread
## Taks2: influence maximization
`python IMP.py –i -k -m -t
is the absolute path of the social network file
is a positive integer
can only be IC or LT
e.g. `python IMP.py -i network.txt -k 10 -m LT -t 120`
Output:
- The seed set found by your algorithm.
- The format of the seed set output should be as follows: each line contains a node index. An example is also included in the package.
# Input:
- A graph *G=(V,E)*
- A predefined seed set cardinality *k*
- A predefined stochastic diffsion model - *IC/LT*# Output:
A *size-k* seed set S' with the maximal 𝜎(𝑆) for any *size-k* seed set S ⊆ 𝑉
# Stochastic Diffusion Models
Diffusion process: At round 0, S中的所有node变成active,其余是inactive,每一轮,每个actived node都会active它的neighbors,直到所有nodes都activated,process end.s
## Independent Cascade(IC)
一个node u active它的neighbor v的几率与weight w(u,v)成比例。
w(u,v) = v 的 in-degree 的倒数
## Linear Threshold(LT)
一开始,每一个node都有一个random threshold 𝜃(在[0,1]之间)。在round t(t>0),一个inactive node v,如果它的所有activated neighbors u 与v的w(u,v)加起来>= 𝜃,那v就会activated。
w(u,v) = v 的 in-degree 的倒数