Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Network Science with Python and NetworkX Quick Start Guide

You're reading from   Network Science with Python and NetworkX Quick Start Guide Explore and visualize network data effectively

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789955316
Length 190 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Edward L. Platt Edward L. Platt
Author Profile Icon Edward L. Platt
Edward L. Platt
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. What is a Network? FREE CHAPTER 2. Working with Networks in NetworkX 3. From Data to Networks 4. Affiliation Networks 5. The Small Scale - Nodes and Centrality 6. The Big Picture - Describing Networks 7. In-Between - Communities 8. Social Networks and Going Viral 9. Simulation and Analysis 10. Networks in Space and Time 11. Visualization 12. Conclusion 13. Other Books You May Enjoy Appendix

Adjacency matrices

A matrix is a way of describing pairwise relationships. A matrix looks like a grid of numbers, as in the following example:

┌           ┐
│ 0 1 42 │
│ 0.5 -3 1 │
└ ┘

The preceding matrix contains six entries, organized in two rows and three columns. A matrix can have any number of rows or columns, but they are always rectangular. A matrix with two rows and three columns is described as a 2 x 3 matrix. If the entire matrix is called A, then the element at row i and column j is called Ai,j. So, in the preceding example, A2,1 = 0.5.

One way to represent a graph as a matrix is to place the weight of each edge in one element of the matrix (or a zero if there is no edge). So, an edge from v3, to v1 with a weight of 37 would be represented by A3,1 = 37, meaning the third row has a 37 in the first column...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image