Learn R Programming

L1centrality (version 0.4.0)

L1centMDS: 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 an undirected graph using the L1 centrality. See Kang and Oh (2025) for a formal definition of a target plot.

Usage

L1centMDS(g, tol, maxiter, verbose, weight_transform)

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

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

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

# S3 method for L1centMDS print(x, ...)

Value

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

  • ‘radius’: Radius of a point representing each vertex in the target plot's circular coordinate system, i.e., \(-\log(L_1\text{ centrality})\) for each vertex.

  • ‘theta’: Angle (in radians) of a point representing each vertex in the target plot's circular coordinate system.

  • ‘stress’: Stress measure defined in Kruskal (1964a).

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.

print.L1centMDS() prints number of iterations it took to fit a target plot.

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.

weight_transform

An optional function to transform the edge weights when g is an igraph object and an edge weight attribute exists. This argument is ignored when g is a distance matrix.

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 arguments passed to or from other methods.

  • plot() method: 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.

  • print() method: This argument is ignored.

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_i\)s.

References

S. Kang and H.-S. Oh. On a notion of graph centrality based on L1 data depth. Journal of the American Statistical Association, 1--13, 2025a.

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

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

Run the code above in your browser using DataLab