generatePerturbations: Generate Perturbations

Description Usage Arguments Value Examples

View source: R/Pathfinder.R

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

1
2
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

1
2
mat=CanadianWeather$monthlyTemp
generated=generatePerturbations(mat, c(1:length(mat[,1])))

NITPicker documentation built on May 2, 2019, 12:35 p.m.