Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

Measuring resilience

Resilience is the ability of a system to withstand errors and attacks. In an electrical grid, for example, resilience would mean keeping power flowing when a transmission line or generator broke down. In traffic, it could mean the ability to reroute cars when a street is closed due to an accident.

Resilience is fundamentally a network property because it is usually achieved with redundant paths. When one path is no longer available, the others can still be used.

The simplest (and crudest) measure of resilience is the density of a network: the fraction of possible edges that exist. The more edges present in a network, the more redundant paths exist between its nodes. The following code uses the density() function to calculate this value for the example networks:

nx.density(G_karate)
0.13903743315508021

nx.density(G_karate)
0.011368341803124411

nx.density(G_karate...
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 €18.99/month. Cancel anytime