probs_adaptive: An auxiliary function to mml_fixed_str().

Description Usage Arguments Value

View source: R/probs_adaptive.R

Description

This function calculates probability at each data point for a variable that has no parent. Noticing we only consider no parents variable when it is the target.

Usage

1
probs_adaptive(data, arities, sampleSize, probsMtx, curIndex)

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.

probsMtx

probsMtx

curIndex

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

Value

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


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