-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
executable file
·82 lines (53 loc) · 4.09 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# L1centrality
<!-- badges: start -->
[](https://CRAN.R-project.org/package=L1centrality) [](https://CRAN.R-project.org/package=L1centrality)
<!-- badges: end -->
Graph/Network Analysis Based on L1 Centrality
## What is *L*<sub>1</sub> centrality?
*L*<sub>1</sub> centrality is a new centrality measure that assesses the prominence of vertices in an undirected and connected graph (Kang and Oh 2024a). It properly handles graphs that have weights assigned to both vertices and edges. Based on this centrality measure, several graphical and multiscale analysis tools are developed.
There are analogous measures for strongly connected directed graphs: the *L*<sub>1</sub> centrality and *L*<sub>1</sub> prestige (Kang and Oh 2024b). The former one quantifies the prominence of vertices in *giving* choices, while the latter evaluates the prominence in *receiving* choices. Multiscale analysis tools are developed from these measures as well.
These measures are further extended to assess the prominence of a *group of vertices*: the group *L*<sub>1</sub> centrality and group *L*<sub>1</sub> prestige measures are developed for this purpose (Kang 2025).
## How can I get L1centrality?
Version 0.3.1 of this package is available on [CRAN](https://cran.r-project.org/package=L1centrality):
``` r
install.packages("L1centrality")
library(L1centrality)
```
You can install the development version (currently equivalent to the CRAN version) of `L1centrality` via:
``` r
devtools::install_github("seungwoo-stat/L1centrality")
library(L1centrality)
```
## How do I use it?
Using the Marvel Cinematic Universe movie network (undirected, connected graph) and the *L*<sub>1</sub> centrality function `L1cent()` provided via this package, we can identify movies with high *L*<sub>1</sub> centrality, i.e., movies that are central in the given network.
```{r example}
library(L1centrality)
L1cent(MCUmovie) |>
sort(decreasing = TRUE) |>
head()
```
There are other useful functions built upon the *L*<sub>1</sub> centrality and *L*<sub>1</sub> prestige measures: `L1centMDS()` (target plot), `L1centNB()` (*L*<sub>1</sub> centrality/prestige-based neighborhood), `L1centLOC()` (local *L*<sub>1</sub> centrality/prestige), `L1centEDGE()` (multiscale edge representation), `L1centGROUP()` (group *L*<sub>1</sub> centrality/prestige), and `Lorenz_plot()` & `Gini()` (group heterogeneity plot and index).
Refer to the package documentation for an overview of the support range for each function.
``` r
?`L1centrality-package`
```
Moreover, two undirected and connected network data are provided: `MCUmovie` (Marvel Cinematic Universe movie network) and `rokassembly21` (Republic of Korea's 21st National Assembly bill cosponsorship network). See the document for further details.
## Where can I learn more?
Visit [this repo](https://github.com/seungwoo-stat/L1centrality-paper) for code to reproduce the figures and analysis from the paper Kang and Oh (2024a) and [this repo](https://github.com/seungwoo-stat/L1prestige-paper) for code to reproduce the figures and analysis from the paper Kang and Oh (2024b). [This repo](https://github.com/seungwoo-stat/group_L1prominence-thesis) contains code for analysis using group *L*<sub>1</sub> centrality and prestige measures (Kang 2025; Ch.6).
## References
Seungwoo Kang and Hee-Seok Oh. [On a Notion of Graph Centrality Based on *L*<sub>1</sub> Data Depth](https://doi.org/10.48550/arXiv.2404.13233). *arXiv preprint arXiv:2404.13233*. 2024a.
Seungwoo Kang and Hee-Seok Oh. [*L*<sub>1</sub> Prominence Measures for Directed Graphs](
https://doi.org/10.48550/arXiv.2408.12078). *arXiv preprint arXiv:2408.12078*. 2024b.
Seungwoo Kang. *Topics in Non-Euclidean Dimension Reduction*. PhD thesis, Seoul National University. 2025.