cond_probs_adaptive: An auxiliary function to mml_fixed_str()

Description Usage Arguments Value

View source: R/cond_probs_adaptive.R

Description

This function calculates conditional probability at each data point for a variable if it is the target or it has at least one parent.

Usage

1
2
cond_probs_adaptive(data, arities, sampleSize, targetIndex, probsMtx,
  curIndex, curPaIndices)

Arguments

data

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

arities

A vector of variable arities in data, in the same order as the column names of data.

sampleSize

The sample size. That is, the number of rows of data.

targetIndex

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

probsMtx

probsMtx

curIndex

The current variable's index. The current variable can either be the target or a different variable.

curPaIndices

The indices of the current variable's parents.

Value

The function outputs a matrix of conditional probabilities with dimension arity(target) by sample size.


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