Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
461 views35 pages

Mining Social Network Graphs

Uploaded by

Aman Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
461 views35 pages

Mining Social Network Graphs

Uploaded by

Aman Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Mining social Network

Graphs
Introduction to Social Network Mining
Social network mining refers to the process of analyzing and extracting
useful patterns, insights, and relationships from data generated by social
networks such as Facebook, Twitter, LinkedIn, and Instagram. The goal
is to uncover hidden patterns, detect communities, understand user
behavior, or even predict future trends.
A social network typically consists of nodes (representing users or
entities) and edges (representing connections or interactions between
them). By mining this data, one can gain insights into how people are
connected, how information spreads, and how influence operates in a
network.
Applications of Social Network Mining
Social network mining has a variety of applications across different domains such as
marketing, politics, social science, health care, and cybersecurity. Here are some key
applications with examples:
Community Detection

In social networks, users often form groups or communities based on common interests,
activities, or social ties. Community detection helps identify these groups and study their
dynamics.

● Example: In a social media network like Facebook, users might naturally form
communities based on shared interests, such as "sports fans" or "movie lovers." By
detecting these communities, businesses can tailor their marketing efforts to target
specific groups with personalized ads, offers, or content.
Influence Analysis

Influence analysis helps identify the most influential people in a network. These are the users
whose opinions or actions have a significant impact on others.

● Example: On Twitter, by analyzing retweets and mentions, one can identify influencers
who have the most impact on spreading information. Marketers often partner with such
influencers to promote products, knowing that their endorsement will reach a large
audience.

Link Prediction

Link prediction aims to forecast the formation of new connections (or links) in the future. This is
based on the idea that people with similar interests or shared connections are likely to form
relationships.

● Example: LinkedIn uses link prediction to suggest new connections (people you may
know). By analyzing your current network and interests, LinkedIn can recommend
Sentiment Analysis and Opinion Mining

Sentiment analysis involves mining social networks to analyze public sentiment (positive, negative,
or neutral) regarding certain topics, products, or services. Opinion mining helps track what people
think about specific events, brands, or trends.

● Example: A company might mine Twitter data to analyze how people feel about a newly
launched product. By studying tweets, they can determine whether the product is being received
positively or negatively and adjust their marketing strategies accordingly.

Fraud Detection and Security

Social network mining can be used to detect fraudulent activities, spam, or other malicious behaviors.
This involves analyzing connections and communication patterns to identify suspicious activities.

● Example: In online social networks like Instagram, users who suddenly acquire a large number
of followers or likes might be flagged for potential fraud (e.g., using fake followers). Similarly,
suspicious communication patterns in email networks might indicate phishing attacks or spam.
Recommendation Systems

Social network data can be used to build recommendation systems that suggest products,
content, or connections based on user preferences and behaviors.

● Example: Facebook uses social network mining to suggest "friends you may know" based
on shared connections or common interests. Similarly, platforms like Netflix and YouTube
use it to recommend movies or videos by analyzing what your friends or people with
similar tastes are watching.

Information Diffusion and Viral Marketing

Understanding how information spreads in a social network (known as information diffusion)


helps in predicting which content will go viral and how to maximize its reach.

● Example: On platforms like YouTube, mining the data about how videos are shared across
different users can help understand how a viral video spreads. Marketers can use these
insights to design campaigns that encourage users to share their content, maximizing its
Political Campaigning and Social Activism

Social network mining plays a key role in political campaigns, where candidates analyze public
sentiment, identify key influencers, and engage voters through targeted messages.

● Example: During elections, political parties can mine Twitter or Facebook data to
understand which topics resonate most with voters, track public sentiment about their
campaign, and identify influential figures who can help amplify their message.

Health Care and Epidemic Tracking

Social network mining can be used in healthcare to track the spread of diseases or to promote
healthy behaviors through social influence.

● Example: During the COVID-19 pandemic, researchers mined social media platforms like
Twitter to study the spread of information about the virus, identify hotspots, and even
detect early warning signs of outbreaks by tracking users' health-related posts.
Example of Social Network Mining in Practice: Twitter Sentiment Analysis
Imagine you want to analyze how users feel about a new smartphone model released by a
company. Here's how social network mining could be used:

1. Data Collection: Collect tweets related to the smartphone by searching for hashtags like
#NewSmartphone or mentions of the company.
2. Sentiment Analysis: Apply natural language processing (NLP) techniques to categorize
each tweet as positive, negative, or neutral. This would give the company an overall
picture of public opinion.
3. Influencer Detection: Identify key users who are generating the most retweets or likes.
These influencers might be technology bloggers or reviewers who have a large following.
4. Trend Analysis: Track how the sentiment changes over time. For example, sentiment
might be positive during the launch but turn negative after users start reporting issues.

This kind of analysis would allow the company to gauge public opinion, identify potential
problems early, and target their marketing efforts more effectively.
Social Networks as a Graph
In social network analysis, social networks are often represented as graphs to help
model the relationships between individuals or entities. A graph is a mathematical
structure consisting of nodes (also called vertices) and edges (or links) that connect
them.
In the context of social networks:
● Nodes represent people, organizations, or entities.
● Edges represent the relationships or interactions between them, such as
friendships, collaborations, or communications.
Representing a social network as a graph makes it easier to analyze and extract
meaningful information about the structure of the network, connections, and influence
patterns.
Key Elements of Social Network Graphs
1. Nodes (Vertices): Each individual, user, or entity in the network is a node. In a
social network, nodes could represent people, businesses, or any other units of
interest.
○ Example: In a Facebook graph, each node represents a Facebook user.
2. Edges (Links): An edge connects two nodes if there is a relationship or
interaction between them. Edges can be directed or undirected, depending on the
nature of the relationship.
○ Undirected Edge: Represents a bidirectional relationship, like a friendship
on Facebook (both parties are friends).
○ Directed Edge: Represents a one-way relationship, like following someone
on Twitter (Person A follows Person B, but not necessarily vice versa).
○ Example: On Twitter, an edge from node A to node B would represent that A
follows B (a directed edge).
Key Elements of Social Network Graphs

Weight of Edges: In some social graphs, edges can have weights representing the
strength or frequency of the relationship (e.g., how often two users communicate).
● Example: In an email network, the weight of an edge between two nodes
might represent how frequently two people exchange emails.
Degree of a Node: The degree of a node is the number of edges connected to it.
● Example: On LinkedIn, a user's degree represents how many connections
they have in their network.
Example of a Social Network as a Graph
Let's take Facebook as an example to visualize it as a graph:
● Nodes: Each Facebook user is a node in the graph.
● Edges: A friendship between two users is represented by an
undirected edge, meaning that if User A is friends with User B,
there is a connection between them.
● Subgraphs: Smaller groups of users that are all connected (such
as a friend group) form a subgraph or community within the
larger network.
Visual Representation:

Imagine you have five users on Facebook: Alice, Bob, Carol, Dave, and Eve. Their
friendships can be represented as:

● Alice is friends with Bob, Carol, and Dave.


Alice
● Bob is friends with Alice and Eve.
/ | \
● Carol is friends with Alice. Bob Carol Dave
● Dave is friends with Alice. \ /
Eve
● Eve is friends with Bob.

In the above graph:

● The nodes are Alice, Bob, Carol, Dave, and Eve.


● The edges represent the friendships between them (for example, there is an edge between Alice and Bob
because they are friends).
● This is an undirected graph because friendships on Facebook are bidirectional.
Types of Social Network Graphs
1. Undirected Graph:
○ Description: The edges between nodes have no direction, representing reciprocal
relationships.
○ Example: Facebook friendships can be modeled as an undirected graph because if person
A is friends with person B, person B is also friends with person A.
2. Directed Graph:
○ Description: The edges between nodes have direction, representing one-way relationships.
○ Example: Twitter follows can be modeled as a directed graph because person A can follow
person B without person B necessarily following person A back.
3. Weighted Graph:
○ Description: The edges have weights, representing the strength or intensity of the
connection.
○ Example: In a professional network like LinkedIn, the weight of an edge between two
individuals could represent how often they communicate or collaborate.
Example of Directed Graph (Twitter)
On Twitter, the relationships between users are not always bidirectional, which makes it suitable to
be modeled as a directed graph. Here’s an example:

● Nodes: Users like Alice, Bob, and Carol.


● Edges: If Alice follows Bob, there is a directed edge from Alice to Bob, but not necessarily the
other way around unless Bob also follows Alice.

In this graph:
Alice → Bob
↓ ● Alice follows Bob (directed edge from Alice to Bob).
Carol ● Alice follows Carol (directed edge from Alice to Carol).
● Bob doesn’t follow Alice or Carol, so there are no edges
going back to Alice or Carol.
Applications of Social Networks as Graphs
1. Community Detection: Identifying tightly connected groups (or subgraphs) of
people who interact more with each other than with the rest of the network. This
is used in marketing, social sciences, and more.
○ Example: Finding friend groups on Facebook or clusters of influencers on
Instagram.
2. Influence Spread and Viral Marketing: Graph-based techniques help to
identify the most influential nodes (people) in a network. These people can be
used to maximize the spread of information, such as in viral marketing
campaigns.
○ Example: Finding the most influential Twitter users whose tweets are
shared the most, and targeting them to promote a product.
Applications of Social Networks as Graphs
3. Friend Recommendation (Link Prediction): Predicting which pairs of users are
likely to form a new connection based on their current friends and the structure of the
graph.
● Example: Facebook uses graph analysis to suggest new friends by identifying
mutual connections.
4. Fraud Detection: Analyzing patterns of connections to detect unusual or suspicious
behavior, such as fake accounts or phishing attacks.
● Example: In a social media graph, accounts with many outgoing links but few
incoming ones (i.e., lots of people being followed but few following back) could
be flagged as potential spam accounts.
Types of Social Networks
Social networks come in various types, depending on the nature of the connections and the
purpose they serve. In simple words, a social network is a platform or system where
individuals, organizations, or entities connect, interact, and share information. Social
networks can be classified into different types based on the kind of relationships they foster
or the activities they support. Here are the main types of social networks, explained with
examples:
1. Personal Social Networks
● Description: These are networks focused on connecting people for personal interactions, friendship,
sharing moments, and maintaining relationships.
● Purpose: Primarily used for socializing, keeping in touch with friends and family, sharing personal
updates, photos, and life events.
● Example: Facebook
○ People use Facebook to connect with friends, share posts, like or comment on pictures, and
organize events. It’s a place where users create profiles and form personal connections.
Types of Social Networks
2. Professional Social Networks
● Description: These networks are designed to help people connect for
professional purposes. They focus on career building, job searching, and
business networking.
● Purpose: Used for networking with colleagues, finding jobs, sharing
professional updates, and collaborating on projects.
● Example: LinkedIn
○ LinkedIn allows users to create professional profiles, showcase skills,
connect with co-workers, and apply for jobs. It’s commonly used by
recruiters to find talent and by professionals to expand their network.
Types of Social Networks
3. Academic or Educational Social Networks
● Description: These networks are created to connect students, teachers, and academics
for learning purposes. They focus on knowledge-sharing and educational
collaboration.
● Purpose: Used for sharing educational resources, collaborating on research, and
connecting students with mentors.
● Example: ResearchGate
○ ResearchGate is a social network where researchers and scholars share academic
papers, find collaborators, and discuss research. It’s a platform for academic
professionals to network and share their findings.
Types of Social Networks
4. Interest-Based Social Networks
● Description: These networks are centered around specific hobbies, interests,
or activities. They connect people who share a common interest, such as
cooking, fitness, or gaming.
● Purpose: Used for discussions, sharing tips, and participating in activities
related to common hobbies or interests.
● Example: Pinterest
○ Pinterest is a social network where users share and discover new ideas,
often focused on DIY projects, recipes, fashion, and home décor. It
allows people with similar interests to connect through “pins” and
“boards.”
Types of Social Networks
5. Media Sharing Social Networks
● Description: These networks are focused on sharing media content like
photos, videos, and music. The main interactions on these platforms revolve
around uploading, viewing, and commenting on shared media.
● Purpose: Used for creating, sharing, and interacting with visual and audio
content.
● Example: Instagram and YouTube
○ Instagram allows users to share photos and short videos, follow other
users, and engage through likes and comments.
○ YouTube is a video-sharing platform where users upload and watch
videos on a variety of topics, from entertainment to education.
Types of Social Networks
6. Discussion Forums and Communities
● Description: These are platforms where people participate in discussions
around specific topics. They usually have a question-and-answer format or
discussion threads.
● Purpose: Used for asking questions, sharing knowledge, and engaging in
conversations on particular subjects.
● Example: Reddit and Quora
○ Reddit is a forum-based social network where users join "subreddits"
(topic-based communities) to discuss almost anything, from technology
to humor.
○ Quora is a Q&A platform where users ask questions, and experts or
community members provide detailed answers.
Types of Social Networks
7. Microblogging Social Networks
● Description: These networks allow users to post short, frequent updates or messages, often used for sharing
news, opinions, or quick thoughts.
● Purpose: Used for sharing concise content (text, images, or links) with followers in real-time.
● Example: Twitter
○ Twitter is a microblogging platform where users can post short messages (tweets) limited to a certain
number of characters. It’s popular for sharing news, opinions, and trending content.

8. Business and Product-Based Social Networks


● Description: These networks focus on building connections between businesses and consumers or providing
platforms for e-commerce and business promotion.
● Purpose: Used for promoting businesses, marketing products, and connecting with customers.
● Example: Yelp and Alibaba
○ Yelp is a platform where users leave reviews for local businesses, such as restaurants, stores, and
services.
○ Alibaba is an e-commerce platform connecting businesses and consumers globally, allowing users to buy
Types of Social Networks
9. Dating Social Networks
● Description: These networks are designed to help people find romantic partners or relationships. They focus
on connecting individuals based on preferences, interests, or location.
● Purpose: Used for dating, matchmaking, and building romantic connections.
● Example: Tinder
○ Tinder allows users to swipe through profiles of potential matches based on their preferences. If two
users like each other, they can start chatting and potentially meet in real life.

10. Anonymous Social Networks


● Description: These networks allow users to interact without revealing their identities. These platforms often
focus on candid, anonymous discussions and content sharing.
● Purpose: Used for open, anonymous conversations, often about personal experiences or sensitive topics.
● Example: Whisper
○ Whisper is an anonymous social network where users post confessions or share their thoughts without
revealing their identity. Other users can comment or respond anonymously.
Types of Social Networks
Clustering of Social Graphs & Direct
Discovery of Communities
Clustering of Social Graphs & Direct Discovery of Communities
In social network analysis, clustering and community discovery refer to identifying groups of
closely connected individuals or entities in a social network graph. These groups, or communities,
often represent people who interact more with each other than with the rest of the network.

Clustering of Social Graphs


Clustering means dividing a social network into smaller, tightly connected groups (clusters). In these
clusters:

● Nodes (people) have more connections with other members of the same cluster.
● Edges (relationships) are denser inside the cluster compared to outside of it.

These clusters or communities could represent groups like:

● Friend groups on social media platforms.


● Professional teams in a company.
● Interest groups in an online forum.
Example:
On Facebook, you might belong to different friend groups:
● Your school friends,
● Your family members,
● Your co-workers.
In a social graph of your Facebook connections, these three groups would form
clusters where members are more likely to be friends with each other (inside the
cluster) than with people from other clusters (outside the cluster).
Direct Discovery of Communities in a Social Graph
Community discovery involves finding these clusters in a social network
graph, often using algorithms. The goal is to identify natural groups of
users based on the connections between them, without knowing the
communities beforehand. This process helps reveal important patterns in the
network.
There are two common approaches for discovering communities:
1. Node-centric methods: Focus on finding clusters where each node
(person) belongs to a distinct group.
2. Edge-centric methods: Focus on finding strong connections between
certain groups of people.
Example of Direct Discovery:
Imagine you work at a large company and have 200 contacts on
LinkedIn. You may not realize it, but:
● 50 of your connections are colleagues from work,
● 30 are college classmates,
● 20 are family members.
Using community discovery algorithms, a system like LinkedIn could
analyze your network and automatically identify these communities
based on how often they interact or share mutual connections.
How Clustering and Community Discovery Work:
1. Identify groups based on connections:
○ Algorithms scan the graph to find nodes that are more
connected to each other than to the rest of the graph.
2. Form clusters or communities:
○ Once nodes with strong connections are found, the graph is
divided into clusters where members of the same group are
closer to each other than to those in other groups.
Real-World Example: Twitter
On Twitter, users follow other users, creating a directed graph. Communities
might form around:
● Fans of a particular celebrity who follow and interact with each other.
● People in the same industry who tweet and engage about similar topics
(e.g., tech, finance).
If you analyze this Twitter graph using community discovery algorithms, you
would find clusters of users who frequently interact. For instance, a cluster
might consist of people who tweet often about sports, while another cluster
might consist of those who discuss technology.
Applications of Clustering and Community Discovery
1. Marketing and Advertising:
○ Marketers can target specific communities (clusters) within a social network
for personalized advertising. For example, advertisers might find a cluster of
users interested in fitness and promote relevant products to them.
2. Recommendation Systems:
○ Social media platforms like Facebook or LinkedIn can use clustering to
recommend new friends or connections. If you belong to a specific cluster
(e.g., people from your college), the system may suggest others from that
cluster as potential friends.
3. Fraud Detection:
○ Clustering can identify suspicious patterns in networks, such as fake
accounts that don’t fit into normal community structures. Accounts that are
not part of any meaningful cluster might be flagged for further inspection.
Visual Example:
Imagine the following simple social graph: Alice---Bob---Carol
\ | /
In this graph: \ Eve /
\ | /
● Cluster 1: Alice, Bob, and Carol are more connected to each Frank--Dave
other than the rest of the network.
● Cluster 2: Dave, Eve, and Frank form another community.

The edges show friendships, and we can clearly see two


communities emerging:

● One community around Alice, Bob, and Carol.


● Another around Dave, Eve, and Frank.

If a clustering algorithm were to analyze this network, it would


likely group these two sets of people into different clusters or
communities.

You might also like