layer_deNovo: Custom 2-D convolution wrapper with to learn IGMs or PWMs.

Description Usage Arguments Value Author(s)

Description

Custom 2-D convolution wrapper with regularization and constraints to learn de novo motifs in the form of IGMs or PWMs.

Usage

1
2
3
4
5
6
7
8
9
layer_deNovo(object, filters, filter_len, lambda_pos = 0,
  lambda_filter = 0, lambda_l1 = 0, lambda_offset = 0,
  strides = c(1L, 1L), padding = "valid", activation = "sigmoid",
  use_bias = TRUE, kernel_initializer = initializer_random_uniform(0,
  0.5), bias_initializer = "zeros",
  kernel_regularizer = total_regularizer,
  kernel_constraint = info_constraint,
  bias_constraint = negative_constraint, input_shape = NULL,
  name = "deNovo_conv", trainable = NULL)

Arguments

object

Keras model object.

filters

Number of convolutional filters.

filter_len

Length of the motifs.

lambda_pos

Position-wise L1 sparsity penalty.

lambda_filter

Sparse group lasso penalty.

lambda_l1

Sparse L1 penalty applied to filter weights.

lambda_offset

L1 penalty applied the offsets (bias) terms.

strides

An integer or list of 2 integers, specifying the strides of the convolution along the width and height. Can be a single integer to specify the same value for all spatial dimensions. Specifying any stride value != 1 is incompatible with specifying any dilation_rate value != 1.

padding

one of "valid" (default) or "same" (case-insensitive).

activation

Activation function to use. Default is the sigmoid activation.

use_bias

Boolean, whether the layer uses a bias vector. Default is to include a bias.

kernel_initializer

Initializer for the kernel weights matrix. Default is random uniform on (0,0.5) (i.e. initializer_random_uniform(0,.5)).

bias_initializer

Initializer for the bias vector. Default is 'zeros'.

kernel_regularizer

Regularizer function applied to the kernel weights matrix. Options include NULL, total_regularizer (default), position_regularizer, or filter_regularizer.

kernel_constraint

Constraint function applied to the kernel matrix. Options include NULL, info_constraint (default), pwm_constraint, negative_constraint, or nonnegative_constraint.

bias_constraint

Constraint function applied to the bias vector.Options include NULL, negative_constraint (default), or nonnegative_constraint.

input_shape

Dimensionality of the input (integer) not including the samples axis. This argument is required when using this layer as the first layer in a model.

name

An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided. Default is 'deNovo_conv'.

trainable

Whether the layer weights will be updated during training. Must be specified.

Value

A Keras model with the added layer.

Author(s)

Matthew Ploenzke, ploenzke@g.harvard.edu


mPloenzke/learnMotifs documentation built on May 27, 2019, 11:55 a.m.