log_prob_adaptive: An auxiliary function to mml_fixed_str()

Description Usage Arguments Value

View source: R/log_prob_adaptive.R

Description

This function calculates log of the conditional probability for a variable given its parents. It is used to obtain p(x|pa of x) in the numerator of the conditional prob p(T|Xs).

Usage

1
log_prob_adaptive(data, targetIndex, condProbsAdpt)

Arguments

data

A dataset whost variables are in numeric/integer format. Any categorical variables must be converted into numeric/integer first.

targetIndex

The target node's index in vars, whose Markov blanket we are interested in.

condProbsAdpt

A conditional probabilities matrix that stores a variable's conditional probability at each data point. This variable is either the target, or has more than one parent.

Value

The function outputs a single log probability value.


kelvinyangli/mbmml documentation built on June 29, 2020, 3:12 a.m.