Git Product home page Git Product logo

smoof's Introduction

smoof: Single- and Multi-Objective Optimization test Functions

CRAN Status Badge CRAN Downloads CRAN Downloads Build Status Build status Coverage Status Research software impact

This package offers an interface for objective functions in the context of (multi-objective) global optimization. It conveniently builds up on the S3 objects, i. e., an objective function is a S3 object composed of a descriptive name, the function itself, a parameter set, box constraints or other constraints, number of objectives and so on. Moreover, the package contains generators for a load of both single- and multi-objective optimization test functions which are frequently being used in the literature of (benchmarking) optimization algorithms. The bi-objective ZDT function family by Zitzler, Deb and Thiele is included as well as the popular single-objective test functions like De Jong's function, Himmelblau function and Schwefel function. Moreover, the package offers a R interface to the C implementation of the Black-Box Optimization Benchmarking (BBOB) set of noiseless test functions.

examplary smoof functions

Installation instructions

Visit the package repository on CRAN. If you want to take a glance at the developement version install the github developement version by executing the following command:

devtools::install_github("jakobbossek/smoof")

Example

Use a build-in generator

Assume the simplifying case where we want to benchmark a set of optimization algorithms on a single objective instance. We decide ourselves for the popular 10-dimensional Rosenbrock banana function. Instead of looking up the function definition, the box constraints and where the global optimum is located, we simply generate the function with smoof and get all the stuff:

library(ggplot2)
library(plot3D)

obj.fn = makeRosenbrockFunction(dimensions = 2L)
print(obj.fn)
print(autoplot(obj.fn))
plot3D(obj.fn, length.out = 50L, contour = TRUE)

Set up an objective function by hand

Let us consider the problem of finding the (global) minimum of the multimodal target function f(x) = x sin(3x) on the closed intervall [0, 2PI]. We define our target function via the makeSingleObjectiveFunction() method providing a name, the function itself and a parameter set. We can display the function within the box constraints with ggplot.

library(ggplot2)

obj.fn = makeSingleObjectiveFunction(
  name = "My fancy function name",
  fn = function(x) x * sin(3*x),
  par.set = makeNumericParamSet("x", len = 1L, lower = 0, upper = 2 * pi)
)
print(obj.fn)
print(getParamSet(obj.fn))
print(autoplot(obj.fn))

The ecr package for evolutionary computing in R needs builds upon smoof functions.

Citation

Please cite my R Journal paper in publications. Get the information via citation("smoof") or use the following BibTex entry:

@Article{,
  author = {Jakob Bossek},
  title = {smoof: Single- and Multi-Objective Optimization Test Functions},
  year = {2017},
  journal = {The R Journal},
  url = {https://journal.r-project.org/archive/2017/RJ-2017-004/index.html},
}

Contact

Please address questions and missing features about the smoof package to the author Jakob Bossek [email protected]. Found some nasty bugs? Please use the issue tracker for this. Pay attention to explain the problem as good as possible. At its best you provide an example, so I can reproduce your problem.

smoof's People

Contributors

agido-krause avatar fcampelo avatar giuseppec avatar jakob-r avatar jakobbossek avatar kerschke avatar mhils avatar mllg avatar surmann avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.