rucrdtw
rucrdtw: Fast time series subsequence search in R - Published in JOSS (2016)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 10 DOI reference(s) in README and JOSS metadata -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Last synced: 6 months ago
·
JSON representation
Repository
R Bindings for the UCR Suite for fast time series subsequence search
Basic Info
Statistics
- Stars: 16
- Watchers: 4
- Forks: 4
- Open Issues: 0
- Releases: 6
Created over 9 years ago
· Last pushed about 2 years ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
README.Rmd
---
output:
md_document:
variant: markdown_github
---
# rucrdtw - R Bindings for the UCR Suite
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE,
fig.path="inst/img/"
)
```
[](https://github.com/pboesu/rucrdtw/actions)
[](https://app.codecov.io/gh/pboesu/rucrdtw)
[](https://cran.r-project.org/package=rucrdtw)
[](http://doi.org/10.21105/joss.00100)
[](http://doi.org/10.21105/joss.00100)
R bindings for functions from the [UCR Suite](http://www.cs.ucr.edu/~eamonn/UCRsuite.html) (Thanawin Rakthanmanon et al. 2012 SIGKDD), which enables ultrafast subsequence search under both Dynamic Time Warping and Euclidean Distance. UCR DTW is several orders of magnitudes faster than naive DTW searches.
```{r dtw-comparison, echo=FALSE, fig.width=7}
library("rucrdtw")
set.seed(123)
rwalk <- cumsum(runif(5e3, min = -0.5, max = 0.5))
qstart <- 876
query <- rwalk[qstart:(qstart+99)]
library(dtw)
#we create a small function that executes a sliding window search
naive_dtw <- function(data, query){
n_comps <- (length(data)-length(query)+1)
dtw_dist <- numeric(n_comps)
for (i in 1:n_comps){
dtw_dist[i] <- dtw(query, data[i:(i+length(query)-1)], distance.only = TRUE, window.type="sakoechiba", window.size=5)$distance
}
which.min(dtw_dist)
}
benchmarks <- rbenchmark::benchmark(
naive_1000 = naive_dtw(rwalk[1:1000], query),
naive_2000 = naive_dtw(rwalk[1:2000], query),
naive_5000 = naive_dtw(rwalk, query),
ucrdtw_1000 = ucrdtw_vv(rwalk[1:1000], query, 0.05),
ucrdtw_2000 = ucrdtw_vv(rwalk[1:2000], query, 0.05),
ucrdtw_5000 = ucrdtw_vv(rwalk, query, 0.05),
replications = 20)
#ensure benchmark test column is of type factor for compatibility with r-devel
benchmarks$test <- as.factor(benchmarks$test)
colors <- rep(c("#33a02c","#1f78b4"), each=3)
#plot with log1p transformed axes, as some execution times may be numerically zero
plot(log1p(benchmarks$elapsed*50) ~ benchmarks$test, cex.axis=0.7, las = 2, yaxt = "n", xlab = "", ylab = "execution time [ms]", ylim = c(0,10), medcol = colors, staplecol=colors, boxcol=colors)
axis(2, at = log1p(c(1,10,100,1000,10000)), labels = c(1,10,100,1000,10000), cex.axis = 0.7)
legend("topright", legend = c("naive DTW", "UCR DTW"), fill = c("#33a02c","#1f78b4"), bty="n")
```
## Installation
Install `rucrdtw` from GitHub:
```{r eval=FALSE}
install.packages("devtools")
devtools::install_github("pboesu/rucrdtw")
```
## Examples
Examples are contained in the vignette `rucrdtw`:
```{r}
library("rucrdtw")
vignette("using_rucrdtw")
```
## Citation
To cite rucrdtw in publications, please use:
Boersch-Supan (2016). rucrdtw: Fast time series subsequence search in R. The Journal of Open Source Software
http://doi.org/10.21105/joss.00100
Rakthanmanon et al. (2012). Searching and mining trillions of time series subsequences under dynamic time warping.
SIGKDD http://doi.org/10.1145/2339530.2339576
## Bug reports and contributions
Please file a github issue at https://github.com/pboesu/rucrdtw/issues if you find any problems or have feature suggestions. Contributions (via pull requests or otherwise) are welcome. Read more about how to contribute and the code of conduct for contributions [here](https://github.com/pboesu/rucrdtw/blob/master/CONTRIBUTING.md). If you don't like github you can contact the package maintainer at pboesu@gmail.com.
## License
COPYRIGHT 2012: Thanawin Rakthanmanon, Bilson Campana, Abdullah Mueen, Gustavo Batista and Eamonn Keogh. (UCR Suite source code)
COPYRIGHT 2016: Philipp Boersch-Supan (R bindings)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Owner
- Name: Philipp Boersch-Supan
- Login: pboesu
- Kind: user
- Location: Cambridge, UK
- Company: British Trust for Ornithology
- Website: pboesu.github.io
- Repositories: 52
- Profile: https://github.com/pboesu
I'm an ecologist interested in the interplay between animals and the environments they inhabit. I like birds.
JOSS Publication
rucrdtw: Fast time series subsequence search in R
Published
November 07, 2016
Volume 1, Issue 7, Page 100
Authors
Tags
Rcpp Data mining Time seriesGitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Philipp Boersch-Supan | p****p@b****e | 151 |
| Maëlle Salmon | m****n@y****e | 2 |
| Noam Ross | r****s@e****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 3
- Average time to close issues: 10 months
- Average time to close pull requests: about 8 hours
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 3.71
- Average comments per pull request: 1.67
- Merged pull requests: 3
- 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
- noamross (3)
- pboesu (1)
- ghost (1)
- saebragani (1)
- pfistfl (1)
Pull Request Authors
- maelle (1)
- pboesu (1)
- noamross (1)
Top Labels
Issue Labels
bug (1)
suspected bug (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 1,431 last-month
- Total docker downloads: 24,104
- Total dependent packages: 2
- Total dependent repositories: 4
- Total versions: 6
- Total maintainers: 1
cran.r-project.org: rucrdtw
R Bindings for the UCR Suite
- Homepage: https://github.com/pboesu/rucrdtw
- Documentation: http://cran.r-project.org/web/packages/rucrdtw/rucrdtw.pdf
- License: Apache License version 1.1 | Apache License version 2.0 [expanded from: Apache License]
-
Latest release: 0.1.6
published about 2 years ago
Rankings
Downloads: 8.7%
Forks count: 12.2%
Dependent packages count: 13.6%
Stargazers count: 14.1%
Dependent repos count: 14.5%
Average: 14.9%
Docker downloads count: 26.1%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- Rcpp * imports
- dtw * suggests
- knitr * suggests
- rbenchmark * suggests
- rmarkdown * suggests
- testthat * suggests
.github/workflows/check-standard.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
