segmentr
An R package to search for independent segments in a sequence (aka change points)
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
An R package to search for independent segments in a sequence (aka change points)
Basic Info
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Created over 8 years ago
· Last pushed over 6 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# segmentr
[](https://travis-ci.org/thalesmello/segmentr)
Given a likelihood provided by the user, this package applies it to a given
matrix dataset in order to find change points in the data that maximize the sum
of the likelihoods of all the segments.
This package provides a handful of algorithms with different time complexities
and assumption compromises so the user is able to choose the best one for the
problem at hand.
## Installation
Install the package from CRAN:
```{r gh-installation, eval = FALSE}
install.packages("segmentr")
```
## Example
Sample code using the package to identify change points in the segments' averages:
```{r example}
require(segmentr)
make_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)^2
segment(data, likelihood = mean_lik, algorithm = "hieralg")
```
For an in depth step-by-step, please check `vignette("segmentr")`.
## Dissertation
The work behind this package is available as a [web book](https://segmentr-package.github.io/segmentr/book/).
## Acknowledgments
This package is part of a Master's degree research thesis at [IME-USP](https://www.ime.usp.br/),
with [Florencia Leonardi][florencia] as thesis adviser.
The algorithms in this package are based on a [paper][basis_paper] by Bruno M. de Castro and [Florencia Leonardi][florencia].
The `berlin` sample dataset was provided by [© Deutscher Wetterdienst][dwd] and put together with the [`rdwd`][rdwd] package by [Berry Boessenkool][brry]. Check [`make_berlin.R`][make_berlin] for the script that builds the dataset.
[basis_paper]: https://arxiv.org/abs/1501.01756
[florencia]: https://www.ime.usp.br/~leonardi/Home_page_of_Florencia_G._Leonardi/Home_Page.html
[dwd]: https://dwd.de/
[rdwd]: https://CRAN.R-project.org/package=rdwd
[brry]: https://github.com/brry
[make_berlin]: https://github.com/thalesmello/segmentr/blob/master/make_berlin.R
Owner
- Name: SegmentR Package
- Login: segmentr-package
- Kind: organization
- Repositories: 1
- Profile: https://github.com/segmentr-package
A package for change point detection in R
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 6 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- thalesmello (7)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- Rcpp >= 0.12.16 imports
- foreach * imports
- glue * imports
- doParallel * suggests
- dplyr * suggests
- knitr * suggests
- lubridate * suggests
- magrittr * suggests
- purrr * suggests
- rdwd * suggests
- rmarkdown * suggests
- testthat * suggests
- tibble * suggests
- tidyr * suggests