Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit db8afdb

Browse files
Draft out network science lecture
1 parent 2e60b73 commit db8afdb

File tree

1 file changed

+94
-3
lines changed

1 file changed

+94
-3
lines changed

‎notes/network_outline.org‎

Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,99 @@
55

66
* Graph Basics and NetworkX
77

8+
** Introduction
9+
10+
- Networks and connections found everywhere
11+
- Transportation with roads and rail tracks
12+
- Airplane networks
13+
- Social networks
14+
- Internet
15+
- Biological networks e.g. food web or molecular networks
16+
- Mathematics calls these *graphs*
17+
- Graphs are collection of two things:
18+
- objects or nodes or vertices
19+
- edges or connections
20+
21+
** NetworkX
22+
23+
- NetworkX is Python package to:
24+
- Create networks,
25+
- Manipulate networks, and
26+
- Study networks
27+
28+
#+BEGIN_SRC python
29+
import networkx as nx
30+
import matplotlib.pyplot as plt
31+
#+END_SRC
32+
33+
** Network Basics and Motivation
34+
35+
- Nodes and edges can have multiple attributes
36+
- Think of social network
37+
- Individuals can be described in multiple ways
38+
- Relationships between the individuals can vary
39+
40+
- There are different graph types
41+
- Undirected graphs, or simply a graph
42+
- Directed graphs, or digraphs
43+
44+
| Type | Alternate Name | Description | NetworkX Call |
45+
|------------------+----------------+------------------------------+--------------------|
46+
| Undirected graph | Graph | Graphs with undirected edges | ~G = nx.Graph()~ |
47+
| Directed graph | Digraph | Graphs with directed edges | ~G = nx.DiGraph()~ |
48+
49+
- Studying networks is powerful
50+
- Reveal properties of a population or system that otherwise is hidden
51+
- Understanding patterns that are a result of the kinds of connections
52+
- Understand strength or robustness of a system
53+
54+
** Objectives
55+
56+
- Ability to describe a parts to make a graph
57+
- Describe what are attributes for nodes and edges
58+
- Describe basic metrics to describe graph
59+
- Understanding how to use Matplotlib to visualize and plot results
60+
- Describe basic analysis to be done on networks
61+
862
* Working with Nodes and Objects
963

64+
| Command | Description |
65+
|-----------------------------+-----------------------------------------------|
66+
| ~nodes(G)~ | Return iterator over the graph nodes |
67+
| ~number_of_nodes(G)~ | Return number of nodes in graph |
68+
| ~all_neighbors(G, node)~ | Return all neighbors of node in graph |
69+
| ~non_neighbors(G, node)~ | Return non-neighbors of node in graph |
70+
| ~common_neighbors(G, u, v)~ | Return common neighbors of two nodes in graph |
71+
72+
#+BEGIN_SRC python
73+
# Create (empty) graph with no nodes and no edges
74+
G = nx.Graph()
75+
#+END_SRC
76+
1077
* Working with Edges and Connections
1178

79+
| Command | Description |
80+
|----------------------+------------------------------------|
81+
| ~edges(G)~ | Return edge view of edges |
82+
| ~number_of_edges(G)~ | Return number of edges in graph |
83+
| ~non_edges(G)~ | Return non-existent edges in graph |
84+
85+
* Node and Edge Attributes
86+
87+
| Type | Command | Description |
88+
|------+----------------------------------+----------------------------------------------------|
89+
| Node | ~set_node_attributes(G, values)~ | Set node attributes from given value or dictionary |
90+
| Node | ~get_node_attributes(G, name)~ | Get node attributes from graph |
91+
| Edge | ~set_edge_attributes(G, values)~ | Set edge attributes from given value or dictionary |
92+
| Edge | ~get_edge_attributes(G, name)~ | Get edge attributes from graph |
93+
1294
* Drawing Graphs in Different Ways
1395

96+
| Command | Description |
97+
|-----------+----------------------------|
98+
| ~draw(G)~ | Draw graph with Matplotlib |
99+
| | |
100+
14101
* Analyzing Graph Metrics
15102

16103
** Degree of Nodes
@@ -33,6 +120,10 @@
33120

34121
* Resources
35122

36-
- [[https://networkx.github.io/][NetworkX]]
37-
- [[http://igraph.org/][igraph]]
38-
- [[http://networksciencebook.com/][Network Science by Albert-László Barabási]]
123+
- Tools
124+
- [[https://networkx.github.io/][NetworkX]]
125+
- [[http://igraph.org/][igraph]]
126+
- Network science
127+
- [[http://networksciencebook.com/][Network Science by Albert-László Barabási]]
128+
- [[https://mathigon.org/course/graphs-and-networks/introduction][Graphs and Networks - Mathigon]]
129+
- [[https://plus.maths.org/content/graphs-and-networks][Graphs and Networks - Plus Magazine]]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /