GOBNILP
f164d83
|
Describes a set of functions used for computing the posterior matrix of a continuous data set. More...
Functions | |
void | SetPosteriorParametricMatrix (Bge_Matrix *data, Bge_Matrix *prior_matrix, Bge_Matrix *posterior_matrix, int alpha_mu, int alpha_omega) |
Sets the posterior matrix of the normal wishart disturbution over precision matrix W and mean v. More... | |
void | SetPriorParametricMatrix (int n, int alpha_mu, int alpha_omega, Bge_Matrix *prior_matrix) |
Defines the Prior matrix for the Wishart disturbution over precision matrix W. More... | |
void | SetSampleMean (Bge_Matrix *data, Bge_Vector *mean_vec) |
Finds the sample mean of the given data. More... | |
void | SetSampleVariance (Bge_Matrix *data, Bge_Vector *mean_vec, Bge_Matrix *variance_matrix) |
Finds the Sample Variance (multiplied by N-1) of a set of data. More... | |
Describes a set of functions used for computing the posterior matrix of a continuous data set.
void SetPosteriorParametricMatrix | ( | Bge_Matrix * | data, |
Bge_Matrix * | prior_matrix, | ||
Bge_Matrix * | posterior_matrix, | ||
int | alpha_mu, | ||
int | alpha_omega | ||
) |
Sets the posterior matrix of the normal wishart disturbution over precision matrix W and mean v.
data | the problem data set |
the | prior matrix for the wishart disturbution over the precision matrix W |
posterior_matrix | the posterior matrix that is set for the normal wishart joint disturbution over the precision matrix and mean |
References BgeMatrixAddition(), BgeMatrixCreate(), BgeMatrixDelete(), BgeMatrixScalarMultipliciation(), BgeVectorCreate(), BgeVectorDelete(), BgeVectorOuterProduct(), SetPriorParametricMatrix(), SetSampleMean(), and SetSampleVariance().
void SetPriorParametricMatrix | ( | int | n, |
int | alpha_mu, | ||
int | alpha_omega, | ||
Bge_Matrix * | prior_matrix | ||
) |
Defines the Prior matrix for the Wishart disturbution over precision matrix W.
n | the number of variables in the gaussian network |
alpha_mu | hyper parameter for the wishart disturbution (normally set to 1) |
alpha_omega | hyper parameter for the wishart disturbution (normally set to n + 2) |
prior_matrix | prior matrix T for the wishart disturbtion over precision matrix W (dimensions = n * n) |
Referenced by SetPosteriorParametricMatrix().
void SetSampleMean | ( | Bge_Matrix * | data, |
Bge_Vector * | mean_vec | ||
) |
Finds the sample mean of the given data.
data | the sample data used to calculate the mean |
mean_vec | the output mean vector (capacity = data->cols) |
References Bge_Vector::items.
Referenced by SetPosteriorParametricMatrix().
void SetSampleVariance | ( | Bge_Matrix * | data, |
Bge_Vector * | mean_vec, | ||
Bge_Matrix * | variance_matrix | ||
) |
Finds the Sample Variance (multiplied by N-1) of a set of data.
data | the data set for the problem where rows = samples and cols = vars |
mean_vec | the vector containing the means for each variable |
variance_matrix | the output variance matrix (dimensions = data->cols * data->cols) |
References BgeMatrixAddition(), BgeMatrixCreate(), BgeMatrixDelete(), BgeVectorCreate(), BgeVectorDelete(), BgeVectorOuterProduct(), BgeVectorSubtraction(), and Bge_Vector::items.
Referenced by SetPosteriorParametricMatrix().