| tf_jiggle | R Documentation |
tf (more) irregularRandomly create some irregular functional data from regular ones.
jiggle it by randomly moving around its arg-values inside the intervals defined by its grid neighbors on the original argument grid.
sparsify it by removing (100*dropout)% of the function values
tf_jiggle(f, amount = 0.4, ...)
tf_sparsify(f, dropout = 0.5)
f |
a |
amount |
how far away from original grid points can the jiggled grid points lie, at most (relative to original distance to neighboring grid points). Defaults to at most 40% (0.4) of the original grid distances. Must be lower than 0.5. |
... |
additional args for the returned |
dropout |
what proportion of values of |
an (irregular) tfd object.
Other tidyfun RNG functions:
tf_rgp()
set.seed(1)
(x <- tf_rgp(2, arg = 21L))
(x_jig <- tf_jiggle(x, amount = 0.2))
(x_sp <- tf_sparsify(x, dropout = 0.3))
c(is_irreg(x_jig), is_irreg(x_sp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.