This generates random spline functions. It is used in the toy nonlinear
dataset created in demo_spline(). This is not necessary for the essential
multimedia workflow, it is only exported for potential independent interest.
spline_fun(D = 2, knots = NULL, h_ix = seq_len(10), ...)A function that can be used to sample points along the random spline functions. Takes argument 'x' giving the input to the spline and returns a D-dimensional response y giving random samples for each of the D splines..
The number random spline functions to generate internally.
The location of knots to use in the spline functions. Defaults to -4, -2, 0, 2, 4.
The locations along which to generate the underlying spline function.
Additional arguments to pass to rnorm during the random noise
generation for each call of the returned function.
demo_spline