L1centMDS {L1centrality}R Documentation

Fitting a Target Plot

Description

L1centMDS() and plot.L1centMDS() are used together to draw a target plot, which is a target-shaped 2D plot that aids in the visual inspection of a network using the L1 centrality. See Kang and Oh (2024) for a formal definition of a target plot.

Usage

L1centMDS(g, tol, maxiter, verbose)

## S3 method for class 'igraph'
L1centMDS(g, tol = 1e-05, maxiter = 1000, verbose = TRUE)

## S3 method for class 'matrix'
L1centMDS(g, tol = 1e-05, maxiter = 1000, verbose = TRUE)

## S3 method for class 'L1centMDS'
plot(x, zoom = 1, main = NULL, ...)

Arguments

g

An igraph graph object or a distance matrix. The graph must be undirected and connected. Equivalently, the distance matrix must be symmetric, and all entries must be finite.

tol

A numerical tolerance. The gradient descent method terminates if the relative magnitude of the gradient falls below tol as in Kruskal (1964b). By default set to 10-5.

maxiter

A number of maximum iteration allowances for the gradient descent algorithm. By default set to 1000.

verbose

A boolean.

  • TRUE (the default): for each iteration, prints (1) current number of iterations, (2) current stress, and (3) relative magnitude of the gradient to the console. At the end, the final message is printed to the console; total number of iterations and final stress.

  • FALSE: suppress message to the console.

x

An L1centMDS object, obtained as a result of the function L1centMDS().

zoom

A numerical value on how much to zoom-in the plot. By default set to 1 (no zoom).

main

Title of the plot. If set to NULL (the default), the title prints “Target plot / Stress = X”.

...

Further graphical parameters supplied to the internal base::plot() (for points) and graphics::text() (for labels) function. See graphics::par() document. To supply an argument to the former one, use the prefix ‘plot.’ and for the latter, ‘text.’. For instance, plot.cex = 1 sets the size of the point, whereas text.cex = 1 sets the size of the label.

Details

Denoting the L1 centrality of vertex i as c_i\in(0,1], a point representing that vertex is placed on a concentric circle with radius r_i = -\log(c_i). Representing each vertex as (r_i, \theta_i) (in circular coordinates), the values of \theta_i are derived using nonmetric multidimensional scaling proposed in Kruskal (1964a,b). The initial configuration is derived using classical multidimensional scaling (stats::cmdscale()). A gradient descent algorithm is employed in deriving optimal \theta_is.

Value

L1centMDS() returns an object of class L1centMDS. It is a list consisting of four vectors:

plot.L1centMDS() draws a target plot. Four concentric circles denote the 1st to 4th quartiles of the radius, and the values of the L1 centrality quartiles are shown in red text. Note that red texts denote the L1 centrality quartiles, not radius quartiles.

Note

The function L1centMDS() is valid only for undirected and connected graphs. Also, L1centMDS() only considers graphs with equal vertex multiplicities.

References

S. Kang and H.-S. Oh. On a notion of graph centrality based on L1 data depth. arXiv preprint arXiv:2404.13233, 2024.

J. B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964a.

J. B. Kruskal. Nonmetric multidimensional scaling: a numerical method. Psychometrika, 29(2): 115–129, 1964b.

See Also

L1cent() for L1 centrality/prestige, MASS::isoMDS() and stats::cmdscale() for multidimensional scaling methods.

Examples

parameters <- L1centMDS(MCUmovie, verbose = FALSE)
plot(parameters)

[Package L1centrality version 0.1.1 Index]