computeKNNWeights-phylo-method: Compute for each vector the weights to apply to it's K...

computeKNNWeights,phylo-methodR Documentation

Compute for each vector the weights to apply to it's K nearest neighbors

Description

Compute for each vector the weights to apply to it's K nearest neighbors

Usage

## S4 method for signature 'phylo'
computeKNNWeights(
  object,
  K = round(sqrt(length(object$tip.label))),
  lcaKNN = FALSE,
  minSize = 20
)

Arguments

object

tree to use for KNN

K

Number of neighbors to consider.

lcaKNN

whether to use LCA based KNN (cluster by minimum size), if false defaults to cophenetic distance (random tie breaking). WARNING: lcaKNN doesn't perform well with broad multifurcations

Value

a list of two items: indices: matrix, cells X neighbors Each row specifies indices of nearest neighbors weights: matrix, cells X neighbors Corresponding weights to nearest neighbors


YosefLab/FastProjectR documentation built on June 13, 2024, 4:20 p.m.