# 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)
EBSPlotProba(out,4)
EBSPlotProba(out,4,data=TRUE,file="mysegmentation.png",type='png')
Run the code above in your browser using DataLab