trimNeighbors: Trim Neighbors

Description Usage Arguments Value Author(s) See Also Examples

Description

Further reduce the cutoff value of a nearest neighbor (NN) table, as produced by nearestNeighbors. This allows one to compute a very relaxed NN table initially, and then quickly restrict it later without having to re-compute all the similarities.

Usage

1
   trimNeighbors(nnm, cutoff)

Arguments

nnm

A nearest neighbor table, as produced by nearestNeighbors.

cutoff

The new similarities cutoff value. All pairs with a similarity less than this value will be removed from the table.

Value

The return value has the same structure as nnm, with some neighbors removed from the indexes and similarties entries.

Author(s)

Kevin Horan

See Also

jarvisPatrick nearestNeighbors

Examples

1
2
3
4
5
   data(sdfsample)
   ap = sdf2ap(sdfsample)
   nnm = nearestNeighbors(ap,numNbrs=20)
   nnm = trimNeighbors(nnm,cutoff=0.5)
   clustering = jarvisPatrick(nnm,k=2,mode="a1b")

girke-lab/ChemmineR-release documentation built on May 17, 2019, 5:26 a.m.