/rsmac

rsmac - use SMAC to optimize functions in R

Primary LanguageRMIT LicenseMIT

rsmac

use smac for r functions

Travis-CI Build Status Coverage Status

Installation

devtools::install_github("jakob-r/rsmac")
# if smac is not installed you can run:
rsmac:::installSmac()

Usage

fun = makeSingleObjectiveFunction(
  name = "my_sphere",
  fn = function(x) {
    sum(x*x) + 7
  },
  par.set = makeParamSet(
    makeNumericVectorParam("x", len = 2L, lower = -5, upper = 5)
  ),
  minimize = TRUE
)
scenario = list("use-instances" = "false", runObj = "QUALITY", numberOfRunsLimit = 10)
res = rsmac(fun, scenario = scenario)

To see how to set up your scenario check the smac manual.

Notes

  • This package is just tested on purely numeric functions so far.
  • This package is designed for Unix systems.
  • The interaction with smac works completely over the file system.
  • Any help is welcome!