densest_subset: Find the densest subset of a matrix

Description Usage Arguments Details Value

View source: R/densest_subset.r

Description

Given a matrix with unknown values, find a densest subset of matrix.

Usage

1
densest_subset(x, empty = NA, density = 1, steps = Inf)

Arguments

x

a matrix with unknown values

empty

the unknown value if different from NA; such as 0 for a numeric matrix or N, empty or unknown for character matrix

density

a desired density

steps

the number of steps

Details

This is a stepwise filtering algorithm that deletes the least represented columns and/or rows to get a matrix subset with the least amount of unknown values until an optimum is reached.

In a lot of cases, an optimum would be a single vector. For this reasons, the algorithm is limited both by the number of steps and by a desired density.

Value

a list containing the densest submatrix, vectors of deleted columns and a vector of densities at each step of the algorithm


bioDS/phyloRNA documentation built on Feb. 21, 2022, 3:28 p.m.