Network Science with Python: Explore the networks around us using network science, social network analysis, and machine learning
- Length: 414 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2023-02-28
- ISBN-10: 1801073694
- ISBN-13: 9781801073691
- Sales Rank: #122532 (See Top 100 Books)
Discover the use of graph networks to develop a new approach to data science using theoretical and practical methods with this expert guide using Python, printed in color
Key Features
- Create networks using data points and information
- Learn to visualize and analyze networks to better understand communities
- Explore the use of network data in both – supervised and unsupervised machine learning projects
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
Network analysis is often taught with tiny or toy data sets, leaving you with a limited scope of learning and practical usage. Network Science with Python helps you extract relevant data, draw conclusions and build networks using industry-standard – practical data sets. You’ll begin by learning the basics of natural language processing, network science, and social network analysis, then move on to programmatically building and analyzing networks. You’ll get a hands-on understanding of the data source, data extraction, interaction with it, and drawing insights from it. This is a hands-on book with theory grounding, specific technical, and mathematical details for future reference. As you progress, you’ll learn to construct and clean networks, conduct network analysis, egocentric network analysis, community detection, and use network data with machine learning. You’ll also explore network analysis concepts, from basics to an advanced level.
By the end of the book, you’ll be able to identify network data and use it to extract unconventional insights to comprehend the complex world around you.
What you will learn
- Explore NLP, network science, and social network analysis
- Apply the tech stack used for NLP, network science, and analysis
- Extract insights from NLP and network data
- Generate personalized NLP and network projects
- Authenticate and scrape tweets, connections, the web, and data streams
- Discover the use of network data in machine learning projects
Who this book is for
Network Science with Python demonstrates how programming and social science can be combined to find new insights. Data scientists, NLP engineers, software engineers, social scientists, and data science students will find this book useful. An intermediate level of Python programming is a prerequisite. Readers from both – social science and programming backgrounds will find a new perspective and add a feather to their hat.
Network Science with Python Acknowledgements Contributors About the author About the reviewers Preface Who this book is for What this book covers Download the example code files Conventions used Get in touch Share Your Thoughts Download a free PDF copy of this book Part 1: Getting Started with Natural Language Processing and Networks Chapter 1: Introducing Natural Language Processing Technical requirements What is NLP? Why NLP in a network analysis book? A very brief history of NLP How has NLP helped me? Simple text analysis Community sentiment analysis Answer previously unanswerable questions Safety and security Common uses for NLP True/False – Presence/Absence Regular expressions (regex) Word counts Sentiment analysis Information extraction Community detection Clustering Advanced uses of NLP Chatbots and conversational agents Language modeling Text summarization Topic discovery and modeling Text-to-speech and speech-to-text conversion MT Personal assistants How can a beginner get started with NLP? Start with a simple idea Accounts that post most frequently Accounts mentioned most frequently Top 10 data science hashtags Additional questions or action items from simple analysis Summary Chapter 2: Network Analysis The confusion behind networks What is this network stuff? Graph theory Social network analysis Network science Resources for learning about network analysis Notebook interfaces IDEs Network datasets Kaggle datasets NetworkX and scikit-network graph generators Creating your own datasets NetworkX and articles Common network use cases Mapping production dataflow Mapping community interactions Mapping literary social networks Mapping historical social networks Mapping language Mapping dark networks Market research Finding specific content Creating ML training data Advanced network use cases Graph ML Recommendation systems Getting started with networks Example – K-pop implementation Summary Further reading Chapter 3: Useful Python Libraries Technical requirements Using notebooks Data analysis and processing pandas NumPy Data visualization Matplotlib Seaborn Plotly NLP Natural Language Toolkit Setup Starter functionality Documentation spaCy Network analysis and visualization NetworkX scikit-network ML scikit-learn Karate Club spaCy (revisited) Summary Part 2: Graph Construction and Cleanup Chapter 4: NLP and Network Synergy Technical requirements Why are we learning about NLP in a network book? Asking questions to tell a story Introducing web scraping Introducing BeautifulSoup Loading and scraping data with BeautifulSoup Choosing between libraries, APIs, and source data Using NLTK for PoS tagging Using spaCy for PoS tagging and NER SpaCy PoS tagging SpaCy NER Converting entity lists into network data Converting network data into networks Doing a network visualization spot check Additional NLP and network considerations Data cleanup Comparing PoS tagging and NER Scraping considerations Summary Chapter 5: Even Easier Scraping! Technical requirements Why cover Requests and BeautifulSoup? Introducing Newspaper3k What is Newspaper3k? What are Newspaper3k’s uses? Getting started with Newspaper3k Scraping all news URLs from a website Scraping a news story from a website Scraping nicely and blending in Converting text into network data End-to-end Network3k scraping and network visualization Introducing the Twitter Python Library What is the Twitter Python Library? What are the Twitter Library’s uses? What data can be harvested from Twitter? Getting Twitter API access Authenticating with Twitter Scraping user tweets Scraping user following Scraping user followers Scraping using search terms Converting Twitter tweets into network data End-to-end Twitter scraping Summary Chapter 6: Graph Construction and Cleaning Technical requirements Creating a graph from an edge list Types of graphs Summarizing graphs Listing nodes Removing nodes Quick visual inspection Adding nodes Adding edges Renaming nodes Removing edges Persisting the network Simulating an attack Summary Part 3: Network Science and Social Network Analysis Chapter 7: Whole Network Analysis Technical requirements Creating baseline WNA questions Revised SNA questions Social network analysis revisited WNA in action Loading data and creating networks Network size and complexity Network visualization and thoughts Important nodes Degrees Degree centrality Betweenness centrality Closeness centrality PageRank Edge centralities Comparing centralities Visualizing subgraphs Investigating islands and continents – connected components Communities Bridges Understanding layers with k_core and k_corona k_core k_corona Challenge yourself! Summary Chapter 8: Egocentric Network Analysis Technical requirements Egocentric network analysis Uses for egocentric network analysis Explaining the analysis methodology Investigating ego nodes and connections Ego 1 – Valjean Ego 2 – Marius Ego 3 – Gavroche Ego 4 – Joly Insights between egos Identifying other research opportunities Summary Chapter 9: Community Detection Technical requirements Introducing community detection Getting started with community detection Exploring connected components Using the Louvain method How does it work? The Louvain method in action! Using label propagation How does it work? Label propagation in action! Using the Girvan-Newman algorithm How does it work? Girvan-Newman algorithm in action! Other approaches to community detection Summary Chapter 10: Supervised Machine Learning on Network Data Technical requirements Introducing ML Beginning with ML Data preparation and feature engineering Degrees Clustering Triangles Betweenness centrality Closeness centrality PageRank Adjacency matrix Merging DataFrames Adding labels Selecting a model Preparing the data Training and validating the model Model insights Other use cases Summary Chapter 11: Unsupervised Machine Learning on Network Data Technical requirements What is unsupervised ML? Introducing Karate Club Network science options Uses of unsupervised ML on network data Community detection Graph embeddings Constructing a graph Community detection in action SCD Graph embeddings in action FEATHER NodeSketch RandNE Other models Using embeddings in supervised ML Pros and cons Loss of explainability and insights An easier workflow for classification and clustering Summary Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts Download a free PDF copy of this book
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Network Science with Python: Explore the networks around us using network science, social network analysis, and machine learning
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.