create.autoencoder: Create an autoencoder for dimensionality reduction

Description Usage Arguments Value Author(s) Examples

View source: R/create.autoencoder.R

Description

Create an autoencoder for dimensionality reduction using keras and tensorflow packages

Usage

1
2
3
create.autoencoder(data.type, data.matrix, encoder.layers.node.nums = c(15,2),
autoencoder.activation = 'tanh', optimization.loss.function = 'mean_squared_error', 
model.file.output.dir = '.')

Arguments

data.type

data type ID. The ID will be used for naming the output file

data.matrix

matrix with data features as rows and patients as columns

encoder.layers.node.nums

vector with the number of nodes for each layer when the reducing the feature dimensions within the autoencoder. The autoencoder will be made symmetrically so the number of nodes in each layer will be used in reverse, not repeating the last layer to re encode the features in the autoencoder

autoencoder.activation

activation function to use in the autoencoder

optimization.loss.function

loss function used for optimization while fitting the autoencoder

model.file.output.dir

file location for the autoencoder file

Value

autoencoder

the autoencoder created by the keras package

autoencoder.file

the hdf5 file that the model was saved in and can be loaded from

Author(s)

Natalie Fox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

example.molecular.data.dir <- paste0(path.package('iSubGen'),'/exdata/');

ae.result <- create.autoencoder(
  data.type = 'cna',
  data.matrix = load.molecular.aberration.data(
    paste0(example.molecular.data.dir,'cna_profiles.txt'),
    patients = c(paste0('EP00',1:9), paste0('EP0',10:30))
    ),
  encoder.layers.node.nums = c(15,5,2)
  );

## End(Not run)

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