Run a Function Iteratively While Varying Parameters

Run simulations or other functions while easily varying parameters from one iteration to the next. Some common use cases would be grid search for machine learning algorithms, running sets of simulations (e.g., estimating statistical power for complex models), or bootstrapping under various conditions. See the 'paramtest' documentation for more information and examples.


paramtest

The paramtest R package includes a set of functions used to iterate a function across multiple sets of parameters. It allows you to train algorithms, run simulations, etc. while easily varying parameters.

This package offers a flexible way to undergo a grid search or random search when varying parameters. Users must provide a function to iterate over, so all inputs and outputs of the function are specified by the user, offering complete control over the process. paramtest encapsulates the search process (along with options to parallelize over multiple processor cores), but is otherwise intentionally left very general-purpose.

However, the package was made with machine learning hyperparameter optimization and statistical power simulations in mind—see the vignettes for examples of these use cases.

Please be aware that this package is still in development, and as such, bugs may still exist, and functions and function parameters may still be subject to change.

To install the most recent stable release, use the following code:

install.packages("devtools")
devtools::install_github("jeff-hughes/paramtest", build_vignettes=TRUE)

Networked computers can sometimes result in installation issues, as the install_github function sometimes has difficulty with networked directories. If this happens to you, use the .libPaths() function to find the path to your R libraries. That will likely give you a path starting with two backslashes, but you will need to convert that to a path starting with a drive letter (e.g., 'C:', 'D:'). From there, use the following code:

install.packages("devtools")
devtools::install_github("jeff-hughes/paramtest", build_vignettes=TRUE,
    args=c('--library="N:/path/to/libraries/"'))

Obviously, change the path to the path where your R libraries are stored.

News

paramtest 0.1.0

  • Initial release of the paramtest package.
  • Offers functions for grid search and random search.
  • Allows users to parallelize over multiple processor cores.
  • Includes a vignette about using paramtest for power simulations.

Reference manual

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

install.packages("paramtest")

0.1.0 by Jeffrey Hughes, a year ago


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


Authors: Jeffrey Hughes [aut, cre]


Documentation:   PDF Manual  


GPL-3 license


Imports stats, boot

Suggests parallel, beepr, pwr, ggplot2, knitr, nlme, lavaan, dplyr, testthat, rmarkdown


See at CRAN