Learn R Programming

NITPicker (version 1.0.1)

generatePerturbations: Generate Perturbations

Description

Find curves similar to a set of example curves. This function takes as input a set of example curves, and uses them to infer a probability distribution of curves. numPert curves are sampled from this probability distribution.

Usage

generatePerturbations(training, tp, iterations = 20, spline = 3,
  knots = 100, numPert = 20)

Arguments

training

This is a numerical matrix of training data, where the rows represent different samples, columns represent different time points (or points on a single spatial axis), and the values correspond to measurements

tp

A numerical vector of time points (or spatial coordinates along a single axis)

iterations

a positive integer, representing the maximum number of iterations employed during time warping (see time_warping in fdasrvf library)

spline

a positive integer, representing the degree of the B-spline interpolation when calculating values at the new, evenly spaced knot positions

knots

a positive integer-- for time warping to work optimally, the points must be evenly sampled. This determines how many points do we evenly sample before conducting time warping

numPert

a positive integer, representing the number of sampled curves to output.

Value

An fdawarp object (see fdasrvf library)

Examples

Run this code
# NOT RUN {
mat=CanadianWeather$monthlyTemp
# }
# NOT RUN {
generated=generatePerturbations(mat, c(1:length(mat[,1])))
# }

Run the code above in your browser using DataLab