jointmotbf.learning | R Documentation |
Two functions for learning joint MoTBFs. The first one, parametersJointMoTBF()
,
gets the parameters by solving a quadratic optimization problem, minimizing
the mean squared error between the empirical joint CDF and the estimated CDF.
The density is obtained as the derivative od the estimated CDF.
The second one, jointMoTBF()
, fixes the equation of the joint function using
the previously learned parameters and converting this "character"
string into an
object of class "jointmotbf"
.
parametersJointMoTBF(X, ranges = NULL, dimensions = NULL) jointMoTBF(object)
X |
A dataset of class |
ranges |
A |
dimensions |
A |
object |
A list with the output of the function |
parametersJointMoTBF()
returns a list with the following 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 the number of iterations needed to solve the problem;
Time contains the execution time.
jointMoTBF()
returns an object of class "jointmotbf"
, which is a list whose only visible element
is the analytical expression of the learned density. It also contains the other aforementioned elements,
which can be retrieved using attributes()
## 1. EXAMPLE ## Generate a multinormal dataset data <- data.frame(X1 = rnorm(100), X2 = rnorm(100)) ## Joint learnings dim <- c(2,3) param <- parametersJointMoTBF(X = data, dimensions = dim) param$Parameters length(param$Parameters) param$Dimension param$Range P <- jointMoTBF(param) P attributes(P) class(P) ############################################################################### ## MORE EXAMPLES ############################################################## ############################################################################### ## Generate a dataset data <- data.frame(X1 = rnorm(100), X2 = rnorm(100), X3 = rnorm(100)) ## Joint learnings dim <- c(3,2,3) 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.