fastWavelets
Compute Maximal Overlap Discrete Wavelet Transform (DWT) and A Trous DWT
Science Score: 13.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
Found 8 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Last synced: 9 months ago
·
JSON representation
Repository
Compute Maximal Overlap Discrete Wavelet Transform (DWT) and A Trous DWT
Basic Info
Statistics
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 0
Created over 4 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# fastWavelets
A lightweight R package for computing the Maximal Overlap Discrete Wavelet Transform (MODWT) and À Trous DWT. This package was originally developed to aid forecasting research in water resources (streamflow forecasting, urban water demand forecasting, etc.)
## Installation
You can install the latest version of fastWavelets with
```r
install.packages("fastWavelets")
```
You can also install the development version of fastWavelets from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("johnswyou/fastWavelets")
```
## Example
Here we decompose a white noise series using MODWT:
```{r example}
library(fastWavelets)
set.seed(839) # make this example reproducible
N <- 1e4 # number of time series points
J <- 9 # decomposition level
my.filter <- 'coif1' # filter
X <- matrix(rnorm(N),N,1) # white noise
modwt.X <- mo_dwt(X,my.filter,J,remove_boundary_coefs=FALSE)
colnames(modwt.X) <- c(paste0("W", 1:J), paste0("V", J))
nbc <- n_boundary_coefs(my.filter, J) # number of boundary affected coefficients
# Visualizations
plot.ts(X, main = "White noise series", ylab="")
plot.ts(modwt.X, nc=1, main="MODWT coefficients")
abline(v=nbc, lwd=2, col="blue", lty=2)
```
In the context of forecasting, everything to the left of the vertical dashed blue line would be removed prior to training a forecasting model using the MODWT coefficients. It is often useful to view wavelet decomposition methods such as the MODWT as a "feature generation" or "feature engineering" method.
Here's how to remove the boundary coefficients:
```{r}
modwt.X <- mo_dwt(X,"coif1",J,remove_boundary_coefs=TRUE)
```
## Available filters
The set of possible values for the argument `filter` (see functions `mo_dwt()` and `atrous_dwt()`):
```r
c('bl7', 'bl9', 'bl10',
'beyl',
'coif1', 'coif2', 'coif3', 'coif4', 'coif5',
'db1', 'db2', 'db3', 'db4', 'db5', 'db6', 'db7', 'db8', 'db9', 'db10', 'db11', 'db12',
'db13', 'db14', 'db15', 'db16', 'db17', 'db18', 'db19', 'db20', 'db21', 'db22', 'db23',
'db24', 'db25', 'db26', 'db27', 'db28', 'db29', 'db30', 'db31', 'db32', 'db33',
'db34', 'db35', 'db36', 'db37', 'db38', 'db39', 'db40', 'db41', 'db42', 'db43', 'db44', 'db45',
'fk4', 'fk6', 'fk8', 'fk14', 'fk18', 'fk22',
'han2_3', 'han3_3', 'han4_5', 'han5_5',
'dmey',
'mb4_2', 'mb8_2', 'mb8_3', 'mb8_4', 'mb10_3', 'mb12_3', 'mb14_3', 'mb16_3', 'mb18_3', 'mb24_3', 'mb32_3',
'sym2', 'sym3', 'sym4', 'sym5', 'sym6', 'sym7', 'sym8', 'sym9', 'sym10', 'sym11', 'sym12', 'sym13', 'sym14',
'sym15', 'sym16', 'sym17', 'sym18', 'sym19', 'sym20', 'sym21', 'sym22', 'sym23', 'sym24', 'sym25', 'sym26', 'sym27',
'sym28', 'sym29', 'sym30', 'sym31', 'sym32', 'sym33', 'sym34', 'sym35', 'sym36', 'sym37', 'sym38', 'sym39', 'sym40',
'sym41', 'sym42', 'sym43', 'sym44', 'sym45',
'vaid',
'la8', 'la10', 'la12', 'la14', 'la16', 'la18', 'la20')
```
## References
Quilty, J., & Adamowski, J. (2018). Addressing the incorrect usage of wavelet-based hydrological and water resources forecasting models for real-world applications with best practices and a new forecasting framework. Journal of Hydrology, 563, 336–353. https://doi.org/10.1016/j.jhydrol.2018.05.003
Bašta, M. (2014). Additive decomposition and boundary conditions in wavelet-based forecasting approaches. Acta Oeconomica Pragensia, 22(2), 48–70. https://doi.org/10.18267/j.aop.431
Benaouda, D., Murtagh, F., Starck, J.-L., & Renaud, O. (2006). Wavelet-based nonlinear multiscale decomposition model for electricity load forecasting. Neurocomputing, 70(1-3), 139–154. https://doi.org/10.1016/j.neucom.2006.04.005
Maheswaran, R., & Khosa, R. (2012). Comparative study of different wavelets for hydrologic forecasting. Computers & Geosciences, 46, 284–295. https://doi.org/10.1016/j.cageo.2011.12.015
Owner
- Name: John You
- Login: johnswyou
- Kind: user
- Location: Toronto, Ontario, Canada
- Company: University of Waterloo
- Website: jswyou.com
- Repositories: 4
- Profile: https://github.com/johnswyou
GitHub Events
Total
- Watch event: 1
- Fork event: 1
Last Year
- Watch event: 1
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- 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
- houjuejue (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 235 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: fastWavelets
Compute Maximal Overlap Discrete Wavelet Transform (MODWT) and À Trous Discrete Wavelet Transform
- Homepage: https://github.com/johnswyou/fastWavelets
- Documentation: http://cran.r-project.org/web/packages/fastWavelets/fastWavelets.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.1
published over 3 years ago
Rankings
Stargazers count: 26.2%
Forks count: 28.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 39.5%
Downloads: 77.4%
Maintainers (1)
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- Rcpp * imports