GOBNILP  f164d83
Functions
bge_score.c File Reference

Describes the main functions for scoring a node within a Gaussian Network using the bge scoring metric. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "bge_score.h"
#include "bge_matrix.h"
Include dependency graph for bge_score.c:

Functions

double * create_log_gamma_ratio_table (int samples, int alpha_omega, int no_vars)
 
double log_prefactor (int no_samples, int alpha_mu)
 
double LogBgeScore (int node, unsigned int *family, int no_parents, int alpha_mu, int alpha_omega, double log_prefactor, double *log_gamma_ratio_table, Bge_Matrix *prior_matrix, Bge_Matrix *posterior_matrix, Bge_Matrix *data)
 Computes The log of the bge score for a node either with or without parents. More...
 
double LogBgeScoreWithoutParents (int node, int alpha_mu, int alpha_omega, double log_prefactor, double *log_gamma_ratio_table, Bge_Matrix *prior_matrix, Bge_Matrix *posterior_matrix, Bge_Matrix *data)
 Computes The log of the bge score for a node without parents. More...
 
double LogBgeScoreWithParents (int node, unsigned int *family, int no_parents, int alpha_mu, int alpha_omega, double log_prefactor, double *log_gamma_ratio_table, Bge_Matrix *prior_matrix, Bge_Matrix *posterior_matrix, Bge_Matrix *data)
 Computes The log of the bge score for a node with parents. More...
 

Detailed Description

Describes the main functions for scoring a node within a Gaussian Network using the bge scoring metric.

Function Documentation

◆ LogBgeScore()

double LogBgeScore ( int  node,
unsigned int *  family,
int  no_parents,
int  alpha_mu,
int  alpha_omega,
double  log_prefactor,
double *  log_gamma_ratio_table,
Bge_Matrix prior_matrix,
Bge_Matrix posterior_matrix,
Bge_Matrix data 
)

Computes The log of the bge score for a node either with or without parents.

Parameters
nodeThe integer representation of the node in relation to the row/column in the dataset
familyThe family of the node being score where the value family[0] = node
no_parentsThe number of parents of the node
alpha_muA hyper parameter used to in computing the posterior_matrix
alpha_omegaA hyper parameter used to in computing the posterior_matrix
log_prefactorThe ratio of logarithms for the score
log_gamma_ratio_tableA table that contains all the possible gamma_ratios for each different size parent set
prior_matrixThe prior matrix T
posterior_matrixThe posterior matrix R
data- The continuous data that the network is being learned from

◆ LogBgeScoreWithoutParents()

double LogBgeScoreWithoutParents ( int  node,
int  alpha_mu,
int  alpha_omega,
double  log_prefactor,
double *  log_gamma_ratio_table,
Bge_Matrix prior_matrix,
Bge_Matrix posterior_matrix,
Bge_Matrix data 
)

Computes The log of the bge score for a node without parents.

Parameters
nodeThe integer representation of the node in relation to the row/column in the dataset
alpha_muA hyper parameter used to in computing the posterior_matrix
alpha_omegaA hyper parameter used to in computing the posterior_matrix
log_prefactorThe ratio of logarithms for the score
log_gamma_ratio_tableA table that contains all the possible gamma_ratios for each different size parent set
prior_matrixThe prior matrix T
posterior_matrixThe posterior matrix R
data- The continuous data that the network is being learned from

◆ LogBgeScoreWithParents()

double LogBgeScoreWithParents ( int  node,
unsigned int *  family,
int  no_parents,
int  alpha_mu,
int  alpha_omega,
double  log_prefactor,
double *  log_gamma_ratio_table,
Bge_Matrix prior_matrix,
Bge_Matrix posterior_matrix,
Bge_Matrix data 
)

Computes The log of the bge score for a node with parents.

Parameters
nodeThe integer representation of the node in relation to the row/column in the dataset
familyThe family of the node being score where the value family[0] = node
no_parentsThe number of parents of the node
alpha_muA hyper parameter used to in computing the posterior_matrix
alpha_omegaA hyper parameter used to in computing the posterior_matrix
log_prefactorThe ratio of logarithms for the score
log_gamma_ratio_tableA table that contains all the possible gamma_ratios for each different size parent set
prior_matrixThe prior matrix T
posterior_matrixThe posterior matrix R
data- The continuous data that the network is being learned from