find_dm_k: Find a suitable k

Description Usage Arguments Value Examples

View source: R/find_dm_k.r

Description

The k parameter for the k nearest neighbors used in DiffusionMap should be as big as possible while still being computationally feasible. This function approximates it depending on the size of the dataset n.

Usage

1
find_dm_k(n, min_k = 100L, small = 1000L, big = 10000L)

Arguments

n

Number of possible neighbors (nrow(dataset) - 1)

min_k

Minimum number of neighbors. Will be chosen for n ≥ big

small

Number of neighbors considered small. If/where n ≤ small, n itself will be returned.

big

Number of neighbors considered big. If/where n ≥ big, min_k will be returned.

Value

A vector of the same length as n that contains suitable k values for the respective n

Examples

1
2
curve(find_dm_k(n),     0, 13000, xname = 'n')
curve(find_dm_k(n) / n, 0, 13000, xname = 'n')

Example output



destiny documentation built on Nov. 8, 2020, 7:38 p.m.

Related to find_dm_k in destiny...