Test Functions for Simulation Experiments and Evaluating Optimization and Emulation Algorithms

Test functions are often used to test computer code. They are used in optimization to test algorithms and in metamodeling to evaluate model predictions. This package provides test functions that can be used for any purpose. Some functions are taken from < https://www.sfu.ca/~ssurjano>, but their R code is not used.


Travis-CI Build Status

Why should I use it?

This R package provides functions for various surfaces that can be used for testing of models, algorithms, etc. For example, if you want to compare how well a neural network does compared to a random forest, you can take data from one of these test functions to train and test them.

How do I use it?

Each of the test functions is called like any other function. The first argument, x, should be a vector representing one point or a matrix that has points in its rows. This can cause problems if you are using a 1-dimensional function and pass in a vector of values. Instead you should pass them in as a matrix with a single column, or vectorize the function.

branin(matrix(runif(20), ncol=2))
#>  [1]  24.119600  71.180268  18.374071   9.839029  36.607437  72.884496
#>  [7] 196.302169  25.185022  13.059216  27.129463

How do I get it?

Install it like any other package with install.packages.


# Or the the development version from GitHub:
# install.packages("devtools")


TestFunctions 0.2.0

Add many new test functions. Added some function modifiers, such as add_zoom.

TestFunctions 0.1.0

Releasing an R package that provides generic test functions to be used for any purpose.

Accepted to CRAN on 9/26/2016.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.0 by Collin Erickson, 4 years ago

Browse source code at https://github.com/cran/TestFunctions

Authors: Collin Erickson

Documentation:   PDF Manual  

GPL-3 license

Suggests knitr, rmarkdown, numDeriv, ContourFunctions

See at CRAN