diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2014-11-29 13:38:11 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2014-11-29 13:38:11 -0500 |
| commit | 59add61ec7b8ada40909edddfb88f193e489303a (patch) | |
| tree | d45b56299916ab8249e0222afb112aa5e2191aa1 /jpa_test/cascade_creation.py | |
| parent | af767b2dcba2d67cd08a5aac4bc4b926d0129382 (diff) | |
| download | cascades-59add61ec7b8ada40909edddfb88f193e489303a.tar.gz | |
algorithms.py
Diffstat (limited to 'jpa_test/cascade_creation.py')
| -rw-r--r-- | jpa_test/cascade_creation.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/jpa_test/cascade_creation.py b/jpa_test/cascade_creation.py index 6e5c34e..19e799f 100644 --- a/jpa_test/cascade_creation.py +++ b/jpa_test/cascade_creation.py @@ -26,13 +26,12 @@ class InfluenceGraph(nx.Graph): for edge in data: split1 = edge.split('\t') split2 = split1[1].split('\n') - u = int(split1[0]) v = int(split2[0]) G.add_edge(u,v) self.add_nodes_from(G.nodes()) self.add_edges_from(G.edges()) - + @property def mat(self): if not hasattr(self, '_mat'): @@ -73,13 +72,6 @@ def generate_cascades(G, p_init, n_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(): """ unit test |
