sivi_lr: SIVI for Logistic Regression

Description Usage Arguments Value Examples

Description

This function is used for the implementation of the SIVI's algorithm (semi-implicit variational inference) in the logistic regression set-up. It adopts the adam optimizer for the covariance matrix and uses the gradient descent optimizer for the Neural Network in the implicit part. The iter number can be tuned manually, and the output is the sampling from the posterior of the latent variables. In this configuration, we have the number of latent variables equal to the numbers of parameters input by X.

Usage

1
2
3
sivi_lr(X, Y, noise_dim = 20, K = 50, J = 100, merge = 1,
  lr = 1e-04, lr2 = 0.01, n_iter = 500, inner_iter = 200,
  pos_num = 1000)

Arguments

X

the matrix for training

Y

the corresponding labels

noise_dim

the input noise dimension

K

the added terms

J

the sampling numbers of latent variables

merge

when merge equals one means using the lower bound, when it equals zero means using the upper bound

lr

the learning rate inside the 200 times iteration

lr2

the learning rate outside the 200 times iteration

n_iter

the whole iteration number

inner_iter

the iteration number for the nural network which reside in the inner part of the iteration and is supposed to be smaller than the iter_num.

pos_num

the sampling numbers of the posterior

Value

the sampling of posterior for the latent variables

Examples

1
sivi_lr(waveform$X.train, waveform$y.train)

wanghg1996/SIVIR documentation built on Dec. 3, 2019, 7:57 a.m.