jointmotbf.learning: Learning Joint Functions

Description Usage Arguments Value Examples

Description

Two functions for learning joint MoTBFs. The first one, parametersJointMoTBF(), gets the parameters by solving a quadratic optimization problem, minimizing the error of the empirical cumulative joint values versus the estimated ones. Finally it derives these parameters in order to obtain parameters of the joint density function. The second one, jointMoTBF(), fixes the equation of the joint function using the previously learned parameters and converting this "character" string in an object of class "jointmotbf".

Usage

1
2
3
parametersJointMoTBF(X, ranges = NULL, dimensions = NULL)

jointMoTBF(object)

Arguments

X

A dataset of class "data.frame".

ranges

A "numeric" matrix by columns with the ranges of the varibles where fitting the function.

dimensions

A "numeric" vector with the number of parameters of each varible.

object

A list with the output of the function parametersJointMoTBF().

Value

parametersJointMoTBF() returns a list with the elements: Parameters, which contains the computed coefficients of the resulting function; Dimension which is a "numeric" vector containing the number of coefficients used for each variable; Range contains a "numeric" matrix with the domain of each variable by columns; Iterations contains a number of iterations needed to solve the problem; Time contains the time that the functions spent to solve the problem.

jointMoTBF() retunrs an object of class "jointmotbf"; It is a list whose unique visible element is the mathematical expression, furthermore it contains the other elements of the output of the parametersJointMoTBF() function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## 1. EXAMPLE
require(mnormt) ## Load the package to generate a multinormal dataset
## Dataset
Mean <- 0; nVar <- 2; ro <- 0
varcov <- matrix(c(rep(c(1, rep(ro, nVar)), nVar-1),1), nrow=nVar)
means <- rep(Mean, nVar)
X <- rmnorm(100,means,varcov)
data <- standardizeDataset(data.frame(X))

## Joint learnings
dim <- c(2,3)
param <- parametersJointMoTBF(X = data, dimensions = dim)

param$Parameters
length(param$Parameters) ## prod(dim)
param$Dimension
param$Range

P <- jointMoTBF(param)
P
attributes(P)
class(P)

###############################################################################
## MORE EXAMPLES ##############################################################
###############################################################################
## ## Dataset
## Mean <- 1; nVar <- 3; ro <- 0.5
## varcov <- matrix(c(rep(c(1, rep(ro, nVar)), nVar-1),1), nrow=nVar)
## means <- rep(Mean, nVar)
## X <- rmnorm(200,means,varcov)
## data <- standardizeDataset(data.frame(X))
##
## ## Joint learnings
## dim <- c(3,2,4,2)
## param <- parametersJointMoTBF(X = data, dimensions = dim)
##
## param$Parameters
## length(param$Parameters) ## prod(dim)
## param$Dimension
## param$Range
## param$Time
##
## P <- jointMoTBF(param)
## P
## attributes(P)
## class(P)
###############################################################################
###############################################################################

MoTBFs documentation built on May 30, 2017, 12:17 a.m.