diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2014-11-28 15:52:29 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2014-11-28 15:52:29 -0500 |
| commit | 4a4a286746568299e240d524a9c9860822141781 (patch) | |
| tree | 35211725738b6d5530f06c6e83a7df8fb01819fe /jpa_test/cascade_creation.py | |
| parent | 68ff5bda1771031d0ac271027cb6245272046a94 (diff) | |
| download | cascades-4a4a286746568299e240d524a9c9860822141781.tar.gz | |
greedy prediction
Diffstat (limited to 'jpa_test/cascade_creation.py')
| -rw-r--r-- | jpa_test/cascade_creation.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/jpa_test/cascade_creation.py b/jpa_test/cascade_creation.py index f8defc7..ca48431 100644 --- a/jpa_test/cascade_creation.py +++ b/jpa_test/cascade_creation.py @@ -47,11 +47,19 @@ def icc_cascade(G, p_init): return cascade -def concat_cascades(cascades): - """ - Concatenate list of cascades into matrix +def generate_cascades(G, p_init, n_cascades): """ + returns list of cascades + """"" + return [icc_cascade(G,p_init) for i in xrange(n_cascades)] + +def greedy_prediction(G, cascades): + """ + returns estimated graph + """ + G_hat = InfluenceGraph(max_proba=None) + G.add_nodes_from(G.nodes()) def test(): """ |
