Networks Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What forms the basis of friend recommendation systems?

A

open triangles: if “A” knows “B” and “A” knows “C”, then it’s probable that “B” also knows “C”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to get 2-item combinations from iterable?

A

itertools.combinations(iterable,2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are Maximal cliques?

A

cliques that cannot be extended by adding an adjacent edge, and are a useful property of the graph when finding communities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a clique?

A

A set of of nodes that are all connected to one another..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can a friend recommendation system be built using a graph of relationships?

A

For each node in the graph, check whether each pair of neighbours of the node have an edge between them. If they don’t, it’s an open triangle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to analyze a subset of nodes in a network?

A

You can copy them out into another graph object using G.subgraph(nodes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to draw a subgraph of G?

A

T_draw = G.subgraph(nodes_of_interest_and_neigbours)

nx. draw(T_draw)
plt. show()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to visualize the distribution of important nodes in graph?

A

plt. hist(list(nx.degree_centrality(G).values()))

plt. hist(list(nx.betweenness_centrality(G).values()))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is betweeness centrality?

A

Betweenness centrality is a node importance metric that uses information about the shortest paths in a network. It is defined as the fraction of all possible shortest paths between any pair of nodes that pass through the node.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to access metadata of nodes?

A

G.nodes(data=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to find maximal cliques in G?

A

nx.find_cliques(G)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly