findEncodingDim {OUTRIDER} | R Documentation

## Find the optimal encoding dimension

### Description

Finds the optimal encoding dimension for a given data set by running a grid search based on the provided parameter set.

### Usage

    findEncodingDim(
      ods,
      params = seq(2, min(100, ncol(ods) - 1, nrow(ods) - 1), 2),
      freq = 0.01,
      zScore = 3,
      sdlog = log(1.6),
      lnorm = TRUE,
      inj = "both",
      ...,
      BPPARAM = bpparam()
    )

    findInjectZscore(
      ods,
      freq = 0.01,
      zScoreParams = c(seq(1.5, 4, 0.5), "lnorm"),
      encDimParams = c(seq(3, 40, 3), seq(45, 70, 5), 100, 130, 160),
      inj = "both",
      ...,
      BPPARAM = bpparam()
    )

### Arguments

`ods` | An OutriderDataSet
`params, encDimParams` | Set of possible q values.
`freq` | Frequency of outlier, defaults to 1E-2
`zScore, zScoreParams` | Set of possible injection Z-score, defaults to 3.
`sdlog` | Standard deviation of the sitribution on the log scale.
`lnorm` | If TRUE, the default, Z-scores are drawn from a log normal distribution with a mean of `log(zScore)` in log-scale.
`inj` | Injection strategy, by default 'both'.
`...` | Further arguments passed on to the `controlForConfounders` function.
`BPPARAM` | BPPARAM object by default bpparam().

### Value

The optimal encoding dimension

### Examples

    ods <- makeExampleOutriderDataSet()
    encDimSearchParams <- c(5, 8, 10, 12, 15)
    zScoreParams <- c(2, 3, 5, 'lnorm')
    implementation <- 'autoencoder'
    register(MulticoreParam(4))

    ods1 <- findEncodingDim(ods, params=encDimSearchParams,
            implementation=implementation)
    plotEncDimSearch(ods1)

    ods2 <- findInjectZscore(ods, zScoreParams=zScoreParams,
            encDimParams=encDimSearchParams, implementation=implementation)
    plotEncDimSearch(ods2)

[Package OUTRIDER version 1.5.2 Index]