condmixt.fwd: Forward pass in neural network conditional mixtures

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A forward pass means that given explanatory variables x, the neural network computes the corresponding values of the mixture parameters.

Usage

1
2
3
4
5
condhparetomixt.fwd(theta, h, m, x)
condhparetomixt.dirac.fwd(theta, h, m, x)
condgaussmixt.fwd(theta, h, m, x)
condgaussmixt.dirac.fwd(theta, h, m, x)
condbergamixt.fwd(theta,h,x)

Arguments

theta

Vector of neural network parameters

h

Number of hidden units

m

Number of components

x

Matrix of explanatory (independent) variables of dimension d x n, d is the number of variables and n is the number of examples (patterns)

Details

condhparetomixt indicates a mixture with hybrid Pareto components, condgaussmixt for Gaussian components, condbergam for a Bernoulli-Gamma two component mixture, dirac indicates that a discrete dirac component is included in the mixture The forward pass for Log-Normal conditional mixture is the same one as for Gaussian conditional mixture. Therefore, condgaussmixt.fwd can be used for the forward pass of a conditional mixture with Log-Normal components.

Value

A matrix of mixture parameters corresponding to the values in x : - for condhparetomixt.fwd, each component requires four parameters (pi, xi, mu, sigma) and the parameter matrix has dimensions m x 4 x n - for condhparetomixt.dirac.fwd, there is an additional parameter for the probability of the dirac at zero so that the mixture parameters are stored in a (4m+1) x n matrix - for condgaussmixt.fwd, each component requires three parameters (pi, mu, sigma) and the parameter matrix has dimensions m x 3 x n - for condgaussmixt.dirac.fwd, there is an additional parameter for the probability of the dirac at zero so that the mixture parameters are stored in a (3m+1) x n matrix - for condbergamixt.fwd, there are three parameters, the probability of the dirac at zero and two parameters for the Gamma distribution

Author(s)

Julie Carreau

References

Bishop, C. (1995), Neural Networks for Pattern Recognition, Oxford

Carreau J. and Vrac, M. (2011) Stochastic Downscaling of Precipitation with Neural Network Conditional Mixture Models, 47, Water Resources Research

Williams, M.P. (1998) Modelling Seasonality and Trends in Daily Rainfall Data, 10, Advances in Neural Information and Processing Systems

See Also

condmixt condmixt.init, condmixt.nll

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
n <- 200
x <- runif(n) # x is a random uniform variate
# y depends on x through the parameters of the Frechet distribution
y <- rfrechet(n,loc = 3*x+1,scale = 0.5*x+0.001,shape=x+1)
plot(x,y,pch=22)
# 0.99 quantile of the generative distribution
qgen <- qfrechet(0.99,loc = 3*x+1,scale = 0.5*x+0.001,shape=x+1)
points(x,qgen,pch="*",col="orange")

h <- 2 # number of hidden units
m <- 4 # number of components

# initialize a conditional mixture with hybrid Pareto components
thetainit <- condhparetomixt.init(1,h,m,y)

params.mixt <- condhparetomixt.fwd(thetainit,h,m,t(x)) # compute mixture parameters

condmixt documentation built on July 1, 2020, 6:04 p.m.