Model Selection by Integrated Completed Likelihood criterion

Description

Computes the exact ICL criterion: -Loglikelihood (data,K) + H(m|K) where H is the entropy of the segmentation, and chooses the optimal number of segments as k= argmin(ICL)

Usage

1
EBSICL(x, prior=numeric())

Arguments

x

An object of class EBS returned by function EBSegmentation applied to data of interest.

prior

A vector of length Kmax giving prior probabilities on the value of K. Default value is uniform on 1:Kmax.

Details

This function is used to compute the entropy of the segmentation in k segments (for k in 1 to Kmax) and choose the optimal K according to the ICL criteria.

Value

NbICL

An integer containing the choice of the optimal number of segments.

ICL

Vector of length x$Kmax containing the ICL values.

Author(s)

Alice Cleynen

References

Rigaill, Lebarbier & Robin (2012): Exact posterior distributions over the segmentation space and model selection for multiple change-point detection problems Statistics and Computing

See Also

EBSegmentation, EBSBIC, EBSPostK

Examples

1
2
3
4
5
6
# changes for Poisson model
set.seed(1)
x<-c(rpois(125,1),rpois(100,5),rpois(50,1),rpois(75,5),rpois(50,1))
out <- EBSegmentation(x,model=1,Kmax=20)
bestK=EBSICL(out)$NbICL
print(bestK)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.