MDL: Minimum Description Length

Description Usage Arguments Details Value Examples

View source: R/MDL.R

Description

This function obtains minimum description length (mdl) values for each candidate subpopulation number.

Usage

1
2
3
4
MDL(CAMResult, mdl.method = 3)

## S4 method for signature 'MDLObj,missing'
plot(x, data.term = FALSE, ...)

Arguments

CAMResult

Result from CAM function.

mdl.method

Approach to calculate mdl values; should be 1, 2, or 3. The default is 3.

x

An object of class "MDLObj" from MDL.

data.term

If true, plot data term (code length of data under model).

...

All other arguments are passed to the plotting command.

Details

This function extracts minimum description length (mdl) values from the result of CAM function, which contains mdl values form three approaches for each candidate subpopulation number. For more details about three approaches, refer to CAMASest.

mdl is code length of data under the model plus code length of model. Both mdl value and the first term about data are returned.

Value

An object of class "MDLObj" containing the following components:

K

The candidate subpopulation numbers.

datalengths

For each model with a certain subpopulation number, code length of data under the model.

mdls

mdl value for each model with a certain subpopulation number.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
#obtain data
data(ratMix3)
data <- ratMix3$X

#Analysis by CAM
rCAM <- CAM(data, K = 2:5, thres.low = 0.30, thres.high = 0.95)

#extract mdl values
MDL(rCAM)
MDL(rCAM, 1)
MDL(rCAM, 2)

#plot MDL curves
plot(MDL(rCAM))
plot(MDL(rCAM), data.term = TRUE) #with data length curve

## End(Not run)

Lululuella/debCAM documentation built on May 14, 2021, 2:45 p.m.