filter_dist_outliers: Filter distance matrix for outliers

Description Usage Arguments Value Author(s)

View source: R/microbiomics.r

Description

Detect and filter distance matrix for potential outliers by heuristical detection. The distance matrix is pruned using the following criterion until no further outliers are found:

  1. Compute distance threshold by computing quant quantile of the entire distance matrix

  2. Find and remove the most extreme data point defined by highest median distance to other data if it has less than n_neighbour neighbours closer than threshold to itself

  3. Return to the first step and continue until no further data points are pruned.

Usage

1
filter_dist_outliers(d, quant = 0.8, n_neighbour = 1)

Arguments

d

distance matrix as matrix

quant

quantile of all distances to use as a filtering threshold

n_neighbour

number of neighbours required

Value

filtered distance matrix, or NULL if all samples were pruned

Author(s)

Tommi Vatanen <[email protected]>


tvatanen/microbiomics documentation built on May 7, 2018, 9:11 a.m.