Learn R Programming

rpatrec (version 1.0.1)

test.smoother: Test how well a smoother can filter noise from data

Description

Use this function to find out about the rate of successful recognition of a simple HS pattern for any smoothing function of your choice. Speciffy the noise and other testing conditions.

Usage

test.smoother(n = 1, m = 5, incr = 1, max = 20, smoother,
  pattern = TRUE, ntype = "white", ...)

Arguments

n
number of runs
m
number of runs per level of noise
incr
value by which the error is increased in each turn
max
max number of times the error is increased
smoother
Function with pre-defined inputs, so that only the parameter input is left to be defined
pattern
Check whether pattern was recognised. If FALSE only the correct position of extrema is checked.
ntype
Noise type. See noise function for details.
...
other parameters the smoother requires

Value

Vector of recognition rates for specified levels of noise

Details

For an overview of the package capabilities, click here rpatrec. Note that this function may be extremely computationally demanding.

Examples

Run this code
## Not run: ------------------------------------
# #Test the kernel regression smoother
# a <- test.smoother(n=5,m=10,incr=0.5,max=50,smoother = kernel,bandwidth=1)
# #Plot the result
# plot(a,type='l')
## ---------------------------------------------

Run the code above in your browser using DataLab