condgaussmixt: The conditional Gaussian mixture distribution

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

Description

Distribution function and density function for the conditional Gaussian mixture without discrete component.

Usage

1
2
pcondgaussmixt(params, m, y, trunc = TRUE)
dcondgaussmixt(params,m,y,log=FALSE,trunc=TRUE)

Arguments

params

m x 3 x n matrix of mixture parameters where n is the number of examples

m

Number of mixture components.

y

Vector of n dependent variables.

log

logical, if TRUE, probabilities p are given as log(p).

trunc

logical, if TRUE (default), the hybrid Pareto density is truncated below zero.

Details

params can be computed by applying condgaussmixt.fwd on the explanatory variables x of dimension d x n associated with y.

Value

Distribution function evaluated at n points for pcondgaussmixt and density function for dcondgaussmixt.

Author(s)

Julie Carreau

References

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

Carreau, J. and Bengio, Y. (2009), A Hybrid Pareto Mixture for Conditional Asymmetric Fat-Tailed Distributions, 20, IEEE Transactions on Neural Networks

See Also

condmixt.nll, condmixt.fwd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# generate train data
ntrain <- 200
xtrain <- runif(ntrain)
ytrain <- rfrechet(ntrain,loc = 3*xtrain+1,scale =
0.5*xtrain+0.001,shape=xtrain+1)
plot(xtrain,ytrain,pch=22) # plot train data
qgen <- qfrechet(0.99,loc = 3*xtrain+1,scale = 0.5*xtrain+0.001,shape=xtrain+1)
points(xtrain,qgen,pch="*",col="orange")

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

# initialize a conditional mixture with Gaussian components and a dirac at zero
thetainit <- condgaussmixt.init(1,h,m,ytrain)

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

cdf <- pcondgaussmixt(params.mixt,m,ytrain) # compute CDF 

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