CelLink
  • Installation
  • Tutorials
  • API documentation
CelLink
  • API documentation
  • CelLink.utils
  • CelLink.utils.graph_smoothing
  • View page source

CelLink.utils.graph_smoothing

CelLink.utils.graph_smoothing(arr, edges, wt)[source]

Adjust node features towards the weighted average of their neighbors’ features.

Parameters:
  • arr (np.array) – Data matrix with shape (n_samples, n_features), where each row corresponds to a node.

  • edges (list of lists) –

    Contains two or three elements:

    edges[0] : list or array of source node indices edges[1] : list or array of target node indices edges[2] : (optional) list or array of weights corresponding to each edge

  • wt (float) – Weight factor for combining original node features with the smoothed features.

Returns:

np.array – Smoothed data matrix of the same shape as ‘arr’.

Previous

© Copyright Xin Luo.

Built with Sphinx using a theme provided by Read the Docs.