Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An R package to search for independent segments in a sequence (aka change points)

License

NotificationsYou must be signed in to change notification settings

segmentr-package/segmentr

Repository files navigation

Travis-CI Build Status

Given a likelihood provided by the user, this package applies it to agiven matrix dataset in order to find change points in the data thatmaximize the sum of the likelihoods of all the segments.

This package provides a handful of algorithms with different timecomplexities and assumption compromises so the user is able to choosethe best one for the problem at hand.

Installation

Install the package from CRAN:

install.packages("segmentr")

Example

Sample code using the package to identify change points in the segments’averages:

require(segmentr)#> Loading required package: segmentrmake_segment<-function(n,p)matrix(rbinom(100*n,1,p),nrow=100)data<- cbind(make_segment(5,0.1), make_segment(10,0.9), make_segment(2,0.1))mean_lik<-function(X) abs(mean(X)-0.5)* ncol(X)^2segment(data,likelihood=mean_lik,algorithm="hieralg")#> Segments (total of 3):#>#> 1:5#> 6:15#> 16:17

For an in depth step-by-step, please checkvignette("segmentr").

Dissertation

The work behind this package is available as awebbook.

Acknowledgments

This package is part of a Master’s degree research thesis atIME-USP, withFlorenciaLeonardias thesis adviser.

The algorithms in this package are based on apaper by Bruno M. de Castro andFlorenciaLeonardi.

Theberlin sample dataset was provided by© DeutscherWetterdienst and put together with therdwd package byBerryBoessenkool. Checkmake_berlin.Rfor the script that builds the dataset.

About

An R package to search for independent segments in a sequence (aka change points)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp