optimHyperParams {FRASER} | R Documentation

## Find optimal encoding dimension

### Description

Finds the optimal encoding dimension by injecting artificial splicing outlier ratios while maximizing the precision-recall curve.

### Usage

    optimHyperParams(
      fds,
      type,
      implementation = "PCA",
      q_param = seq(2, min(40, ncol(fds)), by = 3),
      noise_param = 0,
      minDeltaPsi = 0.1,
      iterations = 5,
      setSubset = 15000,
      injectFreq = 0.01,
      BPPARAM = bpparam(),
      internalThreads = 1,
      plot = TRUE,
      delayed = ifelse(ncol(fds) <= 300, FALSE, TRUE),
      ...
    )

### Arguments

`fds` | A `FraserDataSet` object
`type` | The type of PSI (psi5, psi3 or theta for theta/splicing efficiency)
`implementation` | The method that should be used to correct for confounders.
`q_param` | Vector specifying which values of q should be tested
`noise_param` | Vector specifying which noise levels should be tested.
`minDeltaPsi` | Minimal delta psi of an intron to be be considered a variable intron.
`iterations` | The maximal number of iterations. When the autoencoder has not yet converged after these number of iterations, the fit stops anyway.
`setSubset` | The size of the subset of the most variable introns that should be used for the hyperparameter optimization.
`injectFreq` | The frequency with which outliers are injected into the data.
`BPPARAM` | the BiocParallel parameters for the parallelization
`internalThreads` | The number of threads used internally.
`plot` | If `TRUE`, a plot of the area under the curve and the model loss for each evaluated parameter combination will be displayed after the hyperparameter optimization finishes.
`delayed` | If FALSE, count matrices will be loaded into memory (faster calculations), otherwise the function works on the delayedMatrix representations (more memory efficient). The default value depends on the number of samples in the fds-object.
`...` | Additional parameters passed to `injectOutliers`.

### Value

FraserDataSet

### See Also

`FRASER`

### Examples

      # generate data
      fds <- makeSimulatedFraserDataSet(m=15, j=20)

      # run hyperparameter optimization
      fds <- optimHyperParams(fds, type="psi5", q_param=c(2, 5))

      # get estimated optimal dimension of the latent space
      bestQ(fds, type="psi5")
      hyperParams(fds, type="psi5")

[Package FRASER version 1.4.0 Index]