0% found this document useful (0 votes)
10 views2 pages

SMA Exp 6

The document outlines an experiment aimed at developing a structure-based social media analytics model for businesses, focusing on concepts of centrality in graph theory. It describes various types of centrality, such as degree, betweenness, closeness, and eigenvector centrality, and introduces the NetworkX library for graph analysis in Python. The experiment concludes with the successful development of the model, including a visual representation of a graph.

Uploaded by

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

SMA Exp 6

The document outlines an experiment aimed at developing a structure-based social media analytics model for businesses, focusing on concepts of centrality in graph theory. It describes various types of centrality, such as degree, betweenness, closeness, and eigenvector centrality, and introduces the NetworkX library for graph analysis in Python. The experiment concludes with the successful development of the model, including a visual representation of a graph.

Uploaded by

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

DEPARTMENT OF ARTIFICIAL INTELLIGENCE

&
DATA SCIENCE

Subject: Social Media Analytics Course Code: CSDOL8023


Semester: 8 Course: AI&DS
Laboratory no.: 302 Name of subject teacher: Prof. Gitanjali Korgaonkar
Name of student: Janavi Kachi Roll no: VU2S2223008

Experiment No. 6
Aim: Develop Structure based social media analytics model for any business. (e.g. Structure Based Models -
community detection, influence analysis)

Theory:

Centrality is a key concept in graph theory that refers to measures of the relative importance or "centrality" of a
node in a graph. Nodes that are more "central" in a network are typically more influential or have more
connections to other important nodes.

Types of Centrality:
1. Degree Centrality: Measures the number of direct connections a node has. Nodes with high degree
centrality are well-connected.
2. Betweenness Centrality: Measures how often a node lies on the shortest path between other nodes,
indicating its role as a bridge in the network.
3. Closeness Centrality: Measures how quickly a node can access all other nodes in the network,
indicating its ability to reach others with fewer steps.
4. Eigenvector Centrality: Measures the influence of a node based on the number and quality
(importance) of its neighbors.

The NetworkX library in Python is designed for the creation, manipulation, and study of the structure,
dynamics, and functions of complex networks. It provides tools for the analysis of graphs and networks, which
can represent a wide range of real-world systems, from social networks to transportation systems, biological
networks, and more.

● Graph: A graph is a collection of nodes (also called vertices) connected by edges (also called links).

● Directed vs. Undirected Graphs:


o Undirected Graph: The edges have no direction. That is, the relationship between nodes is
bidirectional.
o Directed Graph (DiGraph): The edges have direction, indicating a one-way relationship
between nodes.

import networkx as nx
import matplotlib.pyplot as plt
# Define nodes
nodes = ['x', 'a', 'b', 'c', 'd', 'e']
# Create graph
G = nx.Graph()
G.add_nodes_from(nodes)

# Add edges to connect 'x' to all other nodes


for node in nodes:
if node != 'x':
G.add_edge('x', node)

# Add edges between other nodes (example)


G.add_edge('a', 'b')
G.add_edge('b', 'c')
G.add_edge('c', 'd')
G.add_edge('d', 'e')
G.add_edge('e', 'a') # Create a cycle
# Draw the graph with 'x' in the center
pos = nx.spring_layout(G, seed=42) # Use spring layout for better visualization
pos['x'] = (0, 0) # Place 'x' at the center
nx.draw(G, pos, with_labels=True, node_size=500, font_size=10)
plt.show()

Conclusion: Thus, we developed Structure based social media analytics model for business.
R1 R2 R3
DOP DOS Conduction File Record Viva -Voce Total Signature
5 Marks 5 Marks 5 Marks 15 Marks

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy