Unit II
Unit II
Introduction to Social Networks Pro iles - De inition of SNA - Importance of SNA - Data
collection and preparation - Challenges and future Analysis of Social Networks Extracted from
Log Files - Data Mining Methods Related to SNA and Log Mining - Clustering Techniques -
Case Study.
In technical terms, a social network is a social structure made up of individuals (or organizations)
called "nodes," which are tied (connected) by one or more specific types of interdependency.
The Network Effect: The value of the network increases as more people join and create profiles.
A profile is a digital representation of an entity (person, business, or bot) within a platform. It serves
as your "ID card" and determines how the network’s algorithm interacts with you.
III. Gateway: It acts as the bridge that allows you to connect to others.
In the study of Graph Theory—which powers social networks—we look at profiles through two
lenses: Nodes and Attributes.
• Node (Vertex)The individual point or "dot" in the network.A user, a brand page, or a group.
• AttributesThe specific data points attached to that [Link], location, interests, job title.
• Edges (Links)The connection between two nodes."Following," "Friendship," "Member of.”
Not all profiles serve the same purpose. They generally fall into three categories:
1. Personal Profiles: Focus on individual identity and private connections (e.g., a private
Instagram or Facebook account).
f
f
2. Professional Profiles: Focus on career, skills, and industry networking (e.g., LinkedIn).
Definition
Social Network Analysis (SNA) is the process of investigating social structures through the use of
networks and graph theory. It characterizes networked structures in terms of nodes (individual
actors, people, or things within the network) and the ties/edges (relationships or interactions) that
connect them.
Think of SNA as mapping and measuring the relationships between people or groups. Instead of
looking at individual data (like "this person lives in New York"), SNA looks at the "lines" between
people (like "this person is friends with 500 people in New York"). It shifts the focus from the
individual to the connection.
To perform SNA, you must break a network down into three primary elements:
I. Nodes (Actors/Vertices): The entities in the network. These are usually people, but they can
also be organizations, websites, or even hashtags.
III. Attributes: The specific properties of the nodes (e.g., age, job title) or the edges (e.g., the
"strength" of a friendship based on how often they message).
SNA is essentially applied Graph Theory. While Graph Theory is the mathematical study of points
and lines, SNA applies those math rules to human behavior.
Concept in Graph Equivalent in
Purpose in Analysis
Theory SNA
• Shifts Focus to Context: It moves from analyzing attributes (age, gender) to analyzing
structures (who talks to whom).
• Explains Contagion: It explains how ideas, behaviors, and viruses spread through "social
contagion."
Benefits of SNA
• Identifying Key Actors: It pinpoints influencers, "gatekeepers" (who control info flow),
and "bridges" (who connect different groups).
• Risk Management: It helps identify "isolated" individuals who might be at risk or "central"
nodes whose removal could collapse the network.
Field Application
For leaders and managers, SNA acts as a Strategic Decision Support Tool:
1. Targeted Interventions: Instead of messaging everyone, leaders can target the "hubs"
(central nodes) to ensure 100% information coverage with 10% of the effort.
2. Managing Change: During a merger, SNA helps leaders see which groups are resisting
integration.
3. Crisis Response: In a network failure or data breach, SNA identifies which parts of the
system are most vulnerable.
Social Network Analysis plays a crucial role in analyzing connected data across multiple domains.
By focusing on relationships and interactions, SNA provides deep insights, improves decision-
making, and supports effective problem-solving in real-world applications.
Data Collection and Preparation is a fundamental and core technical process in Social Network
Analysis (SNA). It involves gathering raw data from various sources and converting it into a clean,
structured, and usable form for network analysis. Since social network data is often large, complex,
and noisy, proper preparation is essential to ensure accurate analysis and meaningful results.
Social network data can be obtained from different sources based on the domain of application.
Common sources include social media platforms where users interact through likes, comments,
shares, and follows. System-generated log files from websites, learning platforms, and enterprise
systems record user activities such as page visits and clicks. Communication data like emails, phone
records, and chat messages also form important network data. In some cases, surveys and
questionnaires are used to manually collect relationship data, especially in organizational or
academic environments. Open datasets and sensor-based systems further contribute to social
network data collection.
Eg: Social media platforms, Log files and system records, Communication and survey data, Open
and real-time data sources
Types of Data in Social Network Analysis
Social Network Analysis deals with different forms of data depending on how information is
generated and stored. Understanding these data types is essential to correctly extract nodes, edges,
and relationships.
I) Structured Data
Definition: Structured data is data that is well-organized in a fixed format, usually stored in tables,
databases, or spreadsheets. Each attribute has a predefined field, making the data easy to store,
search, and analyze.
Explanation: In SNA, structured data commonly represents nodes and edges in the form of edge
lists, adjacency matrices, or relational tables. Because of its clear structure, this data can be directly
used for network construction and analysis.
Definition: Semi-structured data does not follow a rigid table format but still contains tags,
markers, or key-value pairs that provide some level of organization.
Explanation: In SNA, semi-structured data often comes from log files, JSON responses, XML
files, and API outputs. This data needs to be parsed and processed before it can be converted into
nodes and edges.
Example: A website log file recording user activities in JSON format such as page visits and clicks.
Social media API responses that return user interaction data in JSON format are semi-structured
data.
Definition: Unstructured data is data that does not have any predefined structure or format and is
difficult to analyze directly.
Explanation: In Social Network Analysis, unstructured data includes text posts, comments,
messages, images, audio, and videos. Relationships are not explicitly defined and must be extracted
using techniques such as text mining or content analysis.
Example: Twitter tweets, WhatsApp chat messages, email text content, or comments on social
media platforms are examples of unstructured data.
Data collection techniques define how social network data is gathered from various sources. The
choice of technique depends on data availability, scale, and application domain.
Definition: API-based data collection uses official Application Programming Interfaces (APIs)
provided by platforms to access social network data in a controlled and authorized manner.
Explanation: APIs allow researchers to collect user profiles, interactions, and network
relationships while following platform policies. This method is reliable, secure, and commonly used
for large-scale data collection.
Example: Using the Twitter API to collect tweets, retweets, mentions, and follower relationships
for network analysis.
Definition: Web scraping is the process of automatically extracting data from websites by parsing
HTML content.
Explanation: This technique is used when APIs are unavailable or limited. Scraping tools collect
visible data from web pages, but ethical and legal guidelines must be strictly followed.
Example: Extracting user comments and interaction counts from a public forum or blog website to
analyze user networks.
Definition: Log file mining involves collecting and analyzing system-generated logs that record
user actions and events.
Explanation: Logs capture detailed interaction data such as logins, page visits, downloads, and
clicks, making them useful for constructing interaction networks.
Example: Analyzing learning management system logs to study student–student and student–
teacher interactions.
Definition: Survey-based data collection gathers social network data using questionnaires or
interviews, where participants report their relationships or interactions.
Explanation: This technique is useful for small-scale or controlled studies where direct digital data
is unavailable.
Example: A classroom survey asking students to list their friends or study partners to construct a
social network.
Definition: Streaming data collection captures real-time, continuously generated data from social
systems.
Explanation: This technique is used for dynamic networks where relationships and interactions
change frequently over time.
Example: Collecting live chat messages from an online collaboration platform to analyze real-time
interaction networks.
Data Cleaning
Raw social network data often contains errors such as missing values, duplicate records, noise, and
irrelevant interactions. Data cleaning focuses on removing duplicate nodes and edges, correcting
inconsistent values, handling missing data, and filtering spam or bot-generated interactions. This
step ensures that the data accurately represents real-world social interactions and prevents
misleading analysis results.
Actions: Remove duplicates and noise, Handle missing and incorrect data, Filter spam and
irrelevant interactions
Data Transformation
After cleaning, the data is transformed into a format suitable for network analysis. This involves
converting raw data into nodes and edges, assigning weights, directions, and labels to connections,
and aggregating multiple interactions into meaningful relationships. Data may also be converted
into adjacency matrices or edge lists depending on the analysis method.
Actions: Convert data into nodes and edges, Assign weights and directions, Prepare network
structures
Data preprocessing prepares the transformed data for efficient analysis. This includes filtering
inactive nodes, setting thresholds for edges, segmenting data based on time, and extracting
important features such as interaction frequency or centrality values. Normalization and validation
are performed to ensure consistency and accuracy before applying SNA algorithms.
Actions: Node and edge filtering, Feature extraction, Normalization and validation
Data Collection and Preparation is the backbone of Social Network Analysis. Proper handling of
social network data ensures reliable analysis, accurate insights, and effective decision-making.
Without systematic preparation, SNA techniques cannot produce meaningful results.
3. Social networks continuously change over time. Users may join, leave, or alter their
interactions frequently. Capturing these dynamic changes is technically challenging.
4. Data collected from social platforms may be incomplete or noisy. Spam accounts and fake
interactions reduce data quality. Effective data cleaning is necessary for accurate analysis.
5. Ethical concerns arise when data is collected without consent. Analysis results may be
biased or misused. Responsible and transparent usage of data is essential.
6. Integrating data from multiple platforms is difficult. Different formats and standards cause
compatibility issues. Data integration requires additional preprocessing efforts.
7. Visualization of large social networks is complex. Dense networks are difficult to interpret
visually. Advanced visualization techniques are required.
2. Real-time social network analysis will become more common. Live data streams will be
analyzed instantly. This is useful for security and trend monitoring.
3. Dynamic network analysis will receive more focus. Time-aware models will track network
evolution. This will improve understanding of behavior changes.
5. Multilayer and heterogeneous network analysis will expand. Multiple types of relationships
will be studied together. This provides richer and more realistic insights.
6. Explainable social network models will be developed. Results will be easier for humans to
understand. Decision-making will become more transparent.
7. Cross-domain and interdisciplinary research will grow. Social networks will be combined
with healthcare, finance, and education. This will broaden the applications of SNA.
Trend Description
3. Real-Time Intervention: Using SNA to stop "fake news" or "online toxicity" at the
moment it starts to spread from a central node.
Defintion:
Log files are automatically generated records that capture events occurring within a system or
application. Each log entry typically contains information such as user ID, timestamp, event type,
and system resource accessed. Logs are created by web servers, applications, databases, learning
management systems, and network devices. Since logs record real user actions, they provide
accurate and unbiased data for social network extraction.
fl
Types of Log Files
Logs that record user requests made to a web server. They capture page visits, clicks, and browsing
paths. Example: Apache or Nginx access logs.
B) Application Logs
Logs generated by software applications. They store user actions like login, upload, or form
submission. Example: Logs from an online shopping website.
C) System Logs
Logs generated by the operating system. They record system events such as startup and errors.
Example: Linux system event logs.
D) Security Logs
Logs that track authentication and access control events. Used to detect unauthorized access or
attacks. Example: Login failure and firewall logs.
The extraction process begins with collecting raw log files from relevant systems. These logs are
then cleaned to remove noise, duplicate entries, and irrelevant events. Next, important entities such
as users, sessions, or resources are identified as nodes. Relationships between these entities are
derived based on shared activities, sequences of events, or interaction frequency, forming edges in
the network. Finally, the extracted network is represented as a graph and prepared for analysis using
SNA techniques.
User Behavior Analysis Using Log-Based Networks
Log-based social networks help analyze user behavior by revealing interaction patterns and usage
trends. By studying connections derived from logs, analysts can identify active users, collaboration
patterns, and frequently accessed resources. This analysis is useful in understanding learning
behavior in educational systems, customer behavior in e-commerce platforms, and employee
activity in organizational systems. Log-based networks provide insights into both individual and
group-level behavior.
Event-Based Networks
Event-based networks are constructed by treating events recorded in logs as the basis for
relationships. In this approach, nodes represent users or system components, while edges represent
shared or sequential events. For example, two users accessing the same resource within a short time
interval may be connected. Event-based networks are especially useful for analyzing temporal
behavior, detecting anomalies, and understanding workflows within systems.
Extracting social networks from log files enables the application of data mining techniques such as
clustering, classification, and pattern discovery. These networks allow analysts to uncover hidden
relationships, predict future behavior, and optimize system performance. This approach strengthens
the integration of Social Network Analysis with log mining and practical real-world applications.
Social networks extracted from log files provide a powerful and practical method to study
interactions in digital environments. By converting raw log data into meaningful network structures,
organizations can gain valuable insights into user behavior, system usage, and interaction dynamics.
This makes log-based social network extraction a vital component of modern SNA and data mining
systems. Social networks extracted from log files transform raw system data into meaningful
interaction graphs. This approach supports behavioral analysis, system optimization, and intelligent
decision-making, making it a vital component of modern Social Network Analysis.
• Data Volume: Logs grow by gigabytes per hour; parsing them requires high-performance
tools (like Grep, AWK, or Python’s Pandas).
• Dynamic Identity: One person might use three different devices (IP addresses), making it
hard to realize they are the same "node."
• Privacy: Logs often contain sensitive metadata (location, time of activity) that must be
handled with extreme care.
Data Mining Methods Related to SNA and Log Mining
Data mining methods play a crucial role in extracting meaningful knowledge from social networks
and log data. Once interaction networks are built from log files, data mining techniques are applied
to analyze patterns, behaviors, and irregularities. These methods help convert raw interaction data
into actionable insights.
i) Classification Methods
Definition:
Classification is a supervised data mining technique that assigns nodes or data instances into
predefined categories based on learned patterns. In Social Network Analysis, classification is used
to categorize users according to their interaction behavior, role, or importance in the network.
Features such as degree centrality, number of interactions, session duration, and access frequency
derived from log files are used as input. A trained model predicts the class of unknown users or
events.
Example:
Classifying users as normal, power users, or suspicious users based on their activity patterns in
web server logs.
Definition:
Association rule mining discovers frequent relationships and co-occurrence patterns among data
items. In SNA and log mining, association rules help identify relationships between users, actions,
or resources that often occur together. These rules are evaluated using measures such as support and
confidence. This method reveals hidden dependencies within interaction data.
Example:
Finding that users who frequently access a forum also tend to download related documents from
system logs.
Definition:
Pattern discovery identifies recurring sequences or structures in data. In Social Network Analysis,
pattern discovery is used to detect frequent interaction paths, repeated communication structures, or
common behavioral sequences. Log data provides time-ordered events that help identify these
repeated patterns. Such patterns represent normal or expected behavior within the network.
Example:
Discovering a repeated pattern where users log in → view content → participate in discussions →
log out.
Definition:
Anomaly detection identifies behaviors or data points that deviate significantly from normal
patterns. In SNA and log mining, anomalies may indicate security threats, fraud, or abnormal user
behavior. Network-based anomalies include unusually high connectivity, sudden spikes in activity,
or unexpected interaction paths. This method compares current behavior with normal network
patterns.
Example:
Detecting a user account that suddenly communicates with many users in a short period, indicating
possible misuse.
These data mining methods enhance Social Network Analysis by adding intelligence to network
structures extracted from log files. Classification predicts roles, association rules reveal
relationships, pattern discovery identifies behavior trends, and anomaly detection ensures security
and reliability. Together, they form a powerful framework for analyzing social networks derived
from log data.
Structured, semi-
Type of Data Raw system and user Nodes and edges
structured, and network
Used activity logs representing interactions
data
Patterns, trends,
Events, actions, and Connections, in uence,
Main Focus prediction, and
timestamps and network structure
anomalies
fl
fi
Role in Provides raw interaction Converts data into Analyzes networks to
Work ow data network graphs extract insights
Definition
Clustering is an unsupervised learning technique that groups data points or nodes into clusters
such that nodes within the same cluster are more similar to each other than to nodes in other
clusters. Unlike classification, clustering does not require predefined labels. In SNA, similarity is
often measured using interaction frequency, connectivity, or structural properties. Clustering helps
in discovering natural groupings within social networks.
Clustering plays a vital role in understanding social network structures. It helps identify
communities where users interact more frequently with each other than with outsiders. Clustering
simplifies large networks by breaking them into manageable sub-networks. It supports applications
such as influence analysis, recommendation systems, fraud detection, and behavior prediction. In
log-based networks, clustering helps group users with similar activity patterns.
fl
Types of Clustering Techniques
Clustering techniques used in SNA can be broadly categorized based on how clusters are formed
and represented.
I) Partition-Based Clustering
Definition:
Partition-based clustering divides data into a fixed number of clusters. Each node belongs to exactly
one cluster. These methods aim to minimize intra-cluster distance and maximize inter-cluster
distance. Common Algorithm: K-Means
Example:
Grouping users into K clusters based on interaction frequency.
Definition:
Hierarchical clustering builds a hierarchy of clusters.
It can be agglomerative (bottom-up) or divisive (top-down). It is useful for understanding multi-
level community structures.
Example:
Organizing employees into teams, departments, and divisions.
Definition:
Density-based clustering groups nodes based on dense regions.
Clusters are formed where nodes have high local density. It can detect noise and outliers. Common
Algorithm: DBSCAN
Example:
Detecting tightly connected user groups and isolated users.
Definition:
Graph-based clustering uses graph properties to detect clusters. It directly analyzes network
topology using edges and connectivity. Common Algorithms: Spectral clustering, Min-cut
methods
Example:
Partitioning a network into strongly connected components.
Community Detection
Definition
Community detection is a special form of clustering in SNA that identifies groups of nodes with
dense internal connections and sparse external connections. Communities represent real-world
social groups such as friend circles, work teams, or interest groups. Community detection
algorithms optimize measures like modularity to identify these structures.
Common Algorithms
• Girvan–Newman Algorithm
• Louvain Algorithm
• Label Propagation
Example
Clustering techniques are essential tools in Social Network Analysis for discovering communities
and simplifying complex networks. Different clustering methods serve different purposes depending
on network size, density, and application. Understanding these techniques is crucial for analyzing
real-world social networks and log-based interaction data.
Introduction
With the rapid growth of digital education platforms, understanding how students interact within
online learning environments has become essential. Traditional performance evaluation focuses
mainly on grades and attendance, but these measures fail to capture the underlying interaction
patterns among learners. Social Network Analysis (SNA), combined with log mining techniques,
provides a powerful approach to analyze student collaboration, engagement, and learning behavior
using system-generated data.
This case study presents a comprehensive analysis of student interaction networks extracted from
log files of an e-learning system.
Problem Description
The institution observed several challenges in its online learning platform: Uneven student
participation in discussion forums, Lack of collaboration among students, Poor engagement from a
subset of learners, Difficulty in identifying influential and isolated students
The main problem was the absence of a structured method to analyze interaction patterns among
students. The goal of this case study is to apply Social Network Analysis on log data to:
Data Used
Data Source
The dataset was collected from the Learning Management System (LMS) of a university over one
academic semester (6 months). The data was extracted from system log files automatically
generated by the LMS.
Data Attributes
Each log entry contained the following information: Student ID, Session ID, Timestamp, Type of
activity (login, forum post, reply, resource access), Resource ID
Nature of Data
Data Cleaning
Raw log data contained duplicate entries, missing values, and inactive users. The following steps
were performed:
Network Construction
Method Applied
Results
• A small group of students exhibited high centrality and acted as knowledge hubs
Interpretation of Results
The results indicate that student interaction strongly influences learning outcomes. Influential
students played a key role in knowledge dissemination and peer support. Isolated students were at
risk of disengagement and required targeted intervention. The network structure revealed that
collaborative learning improves overall academic performance.
Limitations
Conclusion
This case study clearly demonstrates that Social Network Analysis applied to log files is an
effective method for understanding student interaction behavior in e-learning environments. By
transforming raw log data into meaningful network structures, educators can gain valuable insights
to enhance learning engagement and academic success.