Link Search Menu Expand Document

DeepGLM class

Create DeepGLM model object


Syntax

Mdl = DeepGLM(Network,Name,Value)

Description

Mdl = DeepGLM(Network,Name,Value) returns DeepGLM model object Mdl given neural network structure Network. Name,Value specifies additional options using one or more name-value pair arguments. For example, users can specify the activation function or distribution of the output.

See: Input Arguments, Output Argument, Examples


Input Arguments

Network - Neuron Network structure of the deepGLM model

Data type: Array of positive integer


Neuron Network structure of the deepGLM model. [NumFeatures, L1,...,LM]:

Numfeatures
Number of features (columns) of training data.
L1,...,LM
Number of hidden nodes in each hidden layer. For example, L1 is the number of hidden nodes in the first hidden layer and so on.

Note: The output layer has only 1 node.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Distribution','Normal','Activation','relu' specifies that the distribution of the response is normal, and the activation function of hidden layers is the Rectified Linear Unit (ReLU) function.

'Distribution' - Distribution of the response variable

Data Type: String


Distribution of the response variable, specified as the comma-separated pair consisting of 'Distribution' and one of the following:

'Normal' Normal distribution (default)
'Binomial' Binomial distribution
'Poisson' Poisson distribution

Example: 'Distribution','Normal'

'Activation' - Activation function of hidden layers

Data Type: String


Activation function of hidden layers, specified as the comma-separated pair consisting of 'Activation' and one of the following:

'relu' $f(x)= \text{max}(x,0)$ Rectified Linear Unit (ReLU) function (default)
'sigmoid' $f(x)=\frac{1}{1+e^{-x}}$ Sigmoid function
'tanh' $f(x) = \frac{e^{2x}-1}{e^{2x}+1}$ Tanh function

Example: 'Activation','relu'

'Description' - Model description

Data Type: string


Model description, specified as a string scalar or character vector. Provide additional information about the model.

Default: Empty string

Example: 'Description','DeepGLM with binary output'


Output Arguments

Mdl - DeepGLM Object

Data type: DeepGLM Object


DeepGLM is an object of the DeepGLM class with pre-defined properties and functions.

Object Properties

The DeepGLM object properties include information about model-specific information, coefficient estimates and fitting method.

Properties Data type Description{: .text-center}
ModelName string (r) Name of the model, which is 'DeepGLM'
NumParams integer (+) Number of model parameters
Network array Neural network structure of DeepGLM models
Distribution string Neural network structure of DeepGLM models
Activation string Neural network structure of DeepGLM models
Post * struct • Information about the fittedd method used to estimate model paramters
• The DeepGLM model can only be fitted by NAGVAC and VAFC techniques
Coefficient * cell array • Estimated Mean of weights of Deep Neural Network
• Used to doing point estimation for new test data
CoefficientVar * cell array (r) Variance of coefficient estimates
Shrinkage * array Array storing estimated values of group Lasso coefficients
LogLikelihood * double (r) Loglikelihood of the fitted model.
FittedValue * array (r) • Fitted (predicted) values based on the input data.
• For binary response, these are fitted probability

Notation:

  • * $\rightarrow$ object properties which are only available when the model is fitted. Default value is None.
  • (+) $\rightarrow$ positive number.
  • (r) $\rightarrow$ read-only properties.

Object Methods

Use the object methods to initialize model parameters, predict responses, and to visualize the prediction.

vbayesInit Initialization method of model parameters
vbayesPredict Predict responses of fitted DeepGLM models

Examples

To be updated…


Reference

[1] Tran, M.-N., Nguyen, T.-N., Nott, D., and Kohn, R. (2020). Bayesian deep net GLM and GLMM. Journal of Computational and Graphical Statistics, 29(1):97-113. Read the paper


See Also

LogisticRegression $\mid$ RECH $\mid$ Custom model $\mid$ NAGVAC $\mid$ VAFC