find_sigmas: Calculate the average dimensionality for m different gaussian...

View source: R/sigmas.r

find_sigmasR Documentation

Calculate the average dimensionality for m different gaussian kernel widths (\sigma).

Description

The sigma with the maximum value in average dimensionality is close to the ideal one. Increasing step number gets this nearer to the ideal one.

Usage

find_sigmas(
  data,
  step_size = 0.1,
  steps = 10L,
  start = NULL,
  sample_rows = 500L,
  early_exit = FALSE,
  ...,
  censor_val = NULL,
  censor_range = NULL,
  missing_range = NULL,
  vars = NULL,
  verbose = TRUE
)

Arguments

data

Data set with n observations. Can be a data.frame, matrix, ExpressionSet or SingleCellExperiment.

step_size

Size of log-sigma steps

steps

Number of steps/calculations

start

Initial value to search from. (Optional. default: \log_{10}(min(dist(data))))

sample_rows

Number of random rows to use for sigma estimation or vector of row indices/names to use. In the first case, only used if actually smaller than the number of available rows (Optional. default: 500)

early_exit

logical. If TRUE, return if the first local maximum is found, else keep running

...

Unused. All parameters to the right of the ... have to be specified by name (e.g. find_sigmas(data, verbose = FALSE))

censor_val

Value regarded as uncertain. Either a single value or one for every dimension

censor_range

Uncertainity range for censoring. A length-2-vector of certainty range start and end. TODO: also allow 2\times G matrix

missing_range

Whole data range for missing value model. Has to be specified if NAs are in the data

vars

Variables (columns) of the data to use. Specifying TRUE will select all columns (default: All floating point value columns)

verbose

logical. If TRUE, show a progress bar and plot the output

Value

Object of class Sigmas

See Also

Sigmas, the class returned by this; DiffusionMap, the class this is used for

Examples

data(guo)
sigs <- find_sigmas(guo, verbose = TRUE)
DiffusionMap(guo, sigs)


theislab/destiny documentation built on Oct. 30, 2024, 1:39 a.m.