autoFilterCV: Cross-validation filtering of autoencoder

View source: R/filter_autoencoder.R

autoFilterCVR Documentation

Cross-validation filtering of autoencoder

Description

Cross-validation is done to determine which genes can not be predicted well, by comparing the autoencoder predicted loss with the loss estimating the gene expression as a constant across cells

Usage

autoFilterCV(x, python.module, main, pretrain_file = "",
  nonmissing_indicator = 1, n_human = 21183L, n_mouse = 21122L,
  shared_size = 15494L, model.species = NULL, out_dir = ".",
  batch_size = 32L, write_output_to_tsv = F, fold = 6, samp = 3,
  epsilon = 1e-10, seed = 1, ...)

Arguments

x

Target sparse data matrix of gene by cell. When pretraining is used, the genes should be the same as the nodes used in the pretrained model. If a node gene is missing is the target dataset, set all values of that gene as 0 in x and indicate that using nonmissing_indicator

python.module

The python module for the Python package sctransfer

main

A Python main module

pretrain_file

The pretrained weights file ended with '.hdf5'

nonmissing_indicator

A single value 1 or a vector of 0 and 1s to indicate which nodes are missing in the target dataset. Set to 1 for no pretraining.

model.species

Should be either 'Human' or 'Mouse' when pretraining is used

write_output_to_tsv

If True, then the result of Python is written as .tsv files instead of passing back to R. Default is False.

fold

Number of total CV folds

samp

Number of sampled folds taken to reduce CV time cost

...

Extra parameters passed to Python module sctransfer function api (if no pretraining) or function api_pretrain (with pretraining).

Value

a list of the filtered predicted data matrix and the CV error


jingshuw/SAVERX documentation built on June 20, 2022, 3:17 a.m.