Skip to contents

Randomly create some irregular functional data from regular ones. jiggle it by randomly moving around its arg-values. Only for tfd. sparsify it by setting (100*dropout)% of its values to NA.

Usage

tf_jiggle(f, amount = 0.4, ...)

tf_sparsify(f, dropout = 0.5, ...)

Arguments

f

a tfd object

amount

how far away from original grid points can the new 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 tfd in tf_jiggle

dropout

how many values of f to drop, defaults to 50%.

Value

an (irregular) tfd object

See also

Other tidyfun RNG functions: tf_rgp()

Other tidyfun RNG functions: tf_rgp()