Learn R Programming

MATES (version 0.1)

optimalwithrank_curnode: This function is used in 'P_Knear_rank' #' Compute k-rNNG graph

Description

This function builds one-step neighbor update for penalized K nearest neighbor graphs with rank The output is a list containing the graph and the degree distribution

Usage

optimalwithrank_curnode(k, cur_neis, neighbor, degree, lambda, rowrank)

Value

A list with two elements:

new_neis

Integer vector of length k giving the updated neighbors of the node.

degree

Updated numeric degree vector for all nodes.

Arguments

k

Integer; desired number of neighbors (out-degree) for the current node

cur_neis

Integer vector of current neighbors of the node

neighbor

Integer vector of candidate neighbor indices for this node,

degree

Numeric vector of current degrees for all nodes

lambda

A numeric representing the penalty parameter

rowrank

Numeric vector of rank-based penalties for this node

References

Zhu, Y., & Chen, H. (2023). A new robust graph for graph-based methods. arXiv preprint arXiv:2307.15205.