Editing Machine Learning/Kaggle Social Network Contest/load data
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== How to load the network into networkx == | == How to load the network into networkx == | ||
There is a network analysis package for Python called [http://networkx.lanl.gov/ networkx]. This package can be installed using easy_install. | There is a network analysis package for Python called [http://networkx.lanl.gov/ networkx]. This package can be installed using easy_install. | ||
Line 24: | Line 6: | ||
NOTE: John found that it took up about 5.5GB of memory to load the entire network. We may need to process it in chunks - or maybe decompose it into smaller sub networks. | NOTE: John found that it took up about 5.5GB of memory to load the entire network. We may need to process it in chunks - or maybe decompose it into smaller sub networks. | ||
Method 1 | |||
<pre> | <pre> | ||
import networkx as nx | import networkx as nx | ||
Line 30: | Line 12: | ||
</pre> | </pre> | ||
Method 2 | |||
<pre> | <pre> | ||
import networkx as nx | import networkx as nx | ||
Line 68: | Line 52: | ||
| 86s | | 86s | ||
|} | |} | ||