knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "tools/README-" )
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.
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.
set.seed(0) library(TestFunctions) branin(runif(2)) branin(matrix(runif(20), ncol=2))
ContourFunctions::cf(banana)
Install it like any other package with install.packages
.
install.packages("TestFunctions") # Or the the development version from GitHub: # install.packages("devtools") devtools::install_github("CollinErickson/TestFunctions")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.