-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
124 lines (98 loc) · 3.61 KB
/
Copy pathREADME.Rmd
File metadata and controls
124 lines (98 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rwig
```{r, echo = FALSE, results = "hide", message = FALSE}
# use badges
library(badger)
```
<!-- badges: start -->
```{r, echo = FALSE, results = "asis"}
cat(
badge_doi("10.1016/j.econlet.2019.108874", "yellow",
"DOI: 10.1016/j.econlet.2019.108874"),
badge_lifecycle("experimental", alt = "experimental version"),
badge_cran_release("rwig", "green"),
badge_cran_download("rwig", "grand-total", "green"),
badge_cran_checks("rwig"),
badge_github_actions("fangzhou-xie/rwig", "R-CMD-check.yaml"),
badge_license()
)
```
<!-- badges: end -->
The `rwig` package implements the Sinkhorn algorithms for regularized Optimal
Transport problems, Wasserstein Barycenter algorithms for the regularized
Wasserstein Barycenter problems, Wasserstein Dictionary Learning (WDL) model,
and **W**asserstein **I**ndex **G**eneration (**WIG**) model in **R**
(see references below).
All the methods are implemented from the ground up with C++ and Armadillo
(with Rcpp and RcppArmadillo),
with additional support for multi-threading for the log-stablized
methods for
[sinkhorn](https://fangzhou-xie.github.io/rwig/reference/sinkhorn.html) and
[barycenter](https://fangzhou-xie.github.io/rwig/reference/barycenter.html).
See the [vignette](https://fangzhou-xie.github.io/rwig/articles/threading.html)
on multi-threading for faster processing.
## Installation
This package is on [CRAN](https://cran.rstudio.com/), and I recommend
to use the `pak` to install it:
```r
# install pak if not already done so
# install.packages("pak")
pak::pak("rwig")
# or you can install it in the classic way
install.packages("rwig")
```
<!-- The package is currently under heavy development and can only be considered
as alpha stage. -->
You can install the development version of `rwig` from [GitHub](https://github.com/) with:
```r
# install.packages("pak")
pak::pak("fangzhou-xie/rwig")
```
## Get Started
Please check out all the vignettes for the examples of using this package
under the "Articles" drop down menu on the
[documentation website](https://fangzhou-xie.github.io/rwig/).
## Citation
Please use the following to cite my works:
```
@article{xie2020,
title = {Wasserstein Index Generation Model: Automatic Generation of Time-Series Index with Application to Economic Policy Uncertainty},
author = {Xie, Fangzhou},
year = 2020,
month = jan,
journal = {Economics Letters},
volume = {186},
pages = {108874},
issn = {0165-1765},
doi = {10.1016/j.econlet.2019.108874},
urldate = {2019-12-10},
}
```
## Reference
Peyré, G., & Cuturi, M. (2019).
Computational Optimal Transport: With Applications to Data Science.
_Foundations and Trends® in Machine Learning_, 11(5–6), 355–607.
https://doi.org/10.1561/2200000073
Schmitz, M. A., Heitz, M., Bonneel, N., Ngolè, F., Coeurjolly, D., Cuturi, M., Peyré, G., & Starck, J.-L. (2018).
Wasserstein dictionary learning: Optimal transport-based unsupervised nonlinear dictionary learning.
_SIAM Journal on Imaging Sciences_, 11(1), 643–678.
https://doi.org/10.1137/17M1140431
Xie, F. (2020).
Wasserstein index generation model: Automatic generation of time-series index with applieion to economic policy uncertainty.
_Economics Letters_, 186, 108874.
https://doi.org/10.1016/j.econlet.2019.108874
Xie, F. (2025).
Deriving the Gradients of Some Popular Optimal Transport Algorithms (No. arXiv:2504.08722).
_arXiv_.
https://doi.org/10.48550/arXiv.2504.08722