Learn R Programming

keyplayer (version 1.0.1)

delta.score: The change on objective function for greedy search implimentation

Description

delta.score calculates the base kp score using kpcent with the specified chosen set of players called candidate. Then the function replaces a player from another specified set of plyers called residual and calculates the new kp score. The function finally reports the difference of the two scores.

Usage

delta.score(adj.matrix, candidate, residual, i, j, type, M = Inf,
  T = ncol(adj.matrix), method, binary = FALSE, cmode)

Arguments

adj.matrix
The adjacency matrix of the network. Input the matrix.
candidate
A specified set of players which centrality is measured.
residual
A specified set of players which the member can replace the member in the candidate set.
i
The specific member in candidate set to be replaced
j
The specific member in residual set to replace i in candidate set
type
Choose type="betweenness" for betweenness centrality, type="closeness" for closeness centrality, type="degree" for degree centraslity, type="diffusion" for diffusion centrality. type="evcent"<
M
Positive number indicating the maximum distance between two nodes, above witch the two nodes are considered disconnected. The default is Inf. The option is applicable to mreach.degree, mreach.closeness, fragmentation, and diffusion centra
T
Integer indicating the maximum number of iterations of communication process. For diffusion centrality only. In the first iteration, the adjacency matrix is as the input. In the nth iteration, the adjacency matrix becomes the input adjacency matrix to
method
Indication of which grouping criterion should be used. method="min" indicates the "minimum" criterion (edge values as distances). method="max" indicates the "maximum" criterion (edge values as non-cummulative strengths).
binary
If TRUE, the adjacency matrix is binarized. If FALSE, the edge values are considered. By default, binary=FALSE
cmode
String indicating the type of centrality being evaluated. The option is applicable to degree, mreach.degree, and mreach.closeness centralities. The default is to report the total degree. cmode="outdegree" and cmode="indegree"

Value

  • The change on kp score