MyNixOS website logo
Description

Model-Based Optimization for 'mlr3' Through 'mlrMBO'.

The 'mlrMBO' package can ordinarily not be used for optimization within 'mlr3', because of incompatibilities of their respective class systems. 'mlrintermbo' offers a compatibility interface that provides 'mlrMBO' as an 'mlr3tuning' 'Tuner' object, for tuning of machine learning algorithms within 'mlr3', as well as a 'bbotk' 'Optimizer' object for optimization of general objective functions using the 'bbotk' black box optimization framework. The control parameters of 'mlrMBO' are faithfully reproduced as a 'paradox' 'ParamSet'.

mlrintermbo: mlrMBO mlr3 Interface

check Coverage CRAN Status Badge CRAN Downloads

What Is This?

Currently, it is not possible to use mlrMBO for tuning mlr3 and related packages directly, because of some disagreements between S3 (as used in mlrMBO) and R6 (used in mlr3). mlr3mbo exists, but it is not yet as mature and feature-rich as mlrMBO. mlrintermbo provides the necessary interface to make mlrMBO accessible for mlr3.

To use mlrintermbo, one should NOT load mlrMBO as a library in the current R session. Instead, mlrintermbo will run mlrMBO on a different background R session to keep it sectioned off from the main process. Just load the tuner (for tuning mlr3 "Learners") or optimizer (for tuning bbotk "Objectives"):

library("mlrintermbo")

# Tuning Learners:
library("mlr3tuning")
tuner <- tnr("intermbo")

# Tuning Objectives
library("bbotk")
optimizer <- opt("intermbo")

The tuner / optimizer provide an extensiveParamSet to configure the MBO method, covering practically everything that can usually be configured with an MBOControl object. To find out the specific function of each control parameter, read the mlrMBO reference entries of functions regarding "mlrMBO Control".

Installing

When installing mlrintermbo, the required mlrMBO package is not installed automatically. It is therefore necessary to install mlrMBO manually:

install.packages("mlrMBO")
install.packages("mlrintermbo")

Known Issues

  • Assertion on 'xdt' failed

    Error in .__OptimInstance__eval_batch(self = self, private = private,  : 
      Assertion on 'xdt' failed: Must have at least 1 rows, but has 0 rows.
    

    This is caused by a bug in the callr package. The bug is fixed on CRAN, installing the current versions using install.packages(c("callr", "processx")) should fix the issue.

  • Most other errors

    Some errors, for example

    Error: Domains[,1] must be less than or equal to Domains[,2]
    

    are caused because the surrogate model is failing. (The error above happens when the objective function is giving constant values, which the surrogate learner does not handle well). Initialize the tuner with on.surrogate.error set to "warn" or "quiet" to ignore errors of the surrogate model. E.g.:

    tuner <- tnr("intermbo", on.surrogate.error = "warn")  # alternatively "quiet"
    

License

LGPL-3

Metadata

Version

0.5.1-1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows