mml_logit: A function to calculate the mml of the 1st order logit model

Description Usage Arguments Value

View source: R/mml_logit.R

Description

This function calculates the mml of a 1st order logit model given input and output variables. The mml 1st order logit formula was derived by [Neil, Wallace and Korb 1999]. The parameter priors are assumed to be normally distributed with standard deviation sigma = 3. Due to the difficulty of deriving a closed form formula for the determinant of the FIM, the logit parameters are estimated using the glm() function. The estimated parameters are then used to calculate the FIM and its determinant in order to calculate the mml score.

Usage

1
mml_logit(data, arities, sampleSize, x, y, sigma = 3, debug = FALSE)

Arguments

data

A categorical data set.

arities

A vector of variable arities in data.

sampleSize

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

x

A vector of input variables with any length. For an empty input variable, set x = c().

y

The output/target variable.

sigma

The standard derivation of the assumed Gaussian distribution for parameter prior. The default value is 3 as suggested by the original paper.

debug

A boolean argument to display mml score for each part.

Value

The function by default returns the mml score. But it can also return a list of detailed values, such as nlogPrior, nlogF, etc.


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