create.autoencoder.irf.matrix: Create matrix of independent reduced features

Description Usage Arguments Value Author(s) Examples

View source: R/create.autoencoder.irf.matrix.R

Description

Create matrix of independent reduced features using autoencoders

Usage

1
2
3
create.autoencoder.irf.matrix(data.types, data.matrices,
autoencoders, filter.to.common.patients = FALSE,
patients.to.return = NULL)

Arguments

data.types

vector, where each element is a data type ID matching the names in data.matrices and dist.metrics

data.matrices

list, where each element is a matrix with features as rows and patients as columns

autoencoders

list, where each element is an autoencoder corresponding to each data type. Can be either an keras autoencoder object or the file where the autoencoder was saved.

filter.to.common.patients

logical, where TRUE indicates to filter out patients that don't have all data types.

patients.to.return

vector of patients to return correlations for. If NULL all patients/columns will be used.

Value

matrix where rows are patients and columns are pairs of data types

Author(s)

Natalie Fox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 

# Load three data types and create an autoencder for each
example.molecular.data.dir <- paste0(path.package('iSubGen'),'/exdata/');
molecular.data <- list();
ae.result <- list();
for(i in c('cna','snv','methy')) {
  molecular.data[[i]] <- load.molecular.aberration.data(
    paste0(example.molecular.data.dir,i,'_profiles.txt'),
    patients = c(paste0('EP00',1:9), paste0('EP0',10:30))
    );
  ae.result[[i]] <- create.autoencoder(
    data.type = i,
    data.matrix = molecular.data[[i]],
    encoder.layers.node.nums = c(10,2)
    )$autoencoder;
  }

# Create a matrix of the bottleneck layers 
irf.matrix <- create.autoencoder.irf.matrix(
  data.types = names(molecular.data),
  data.matrices = molecular.data,
  autoencoders = ae.result
  );

## End(Not run)

iSubGen documentation built on April 22, 2021, 5:11 p.m.