Ipython Learning Note 2 Network Graph--networkx

Source: Internet
Author: User

If Networkx is not good, pip uninstall then install

1) Look at each node's social situation

Import Networkx as Nxin [2]: nx.read< Click tab to see Options > such as Nx.read_adjlist Nx.read_dot Nx.read_ Edgelist this time should be in a series of edges and Dot folder fbdata in [3]: g = nx.read_edgelist ('0.edges') At this point G inherits the various method of read, viewing the case of G in [5]: Len (G.nodes ()), Len (G.edges ()) out[5]: (333, 2519)

The 0 ego user then appears to has 333 friends (nodes), and there are 2519 connections (edges) between these friends.

2) Look at the structure of social network

sg =for in == S1[0]nx.radius (SG), nx.diameter (SG) may be a version issue,

Ipython Learning Note 2 Network Graph--networkx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.