tree: R6 Class Representing a tree for StoSOO

treeR Documentation

R6 Class Representing a tree for StoSOO

Description

tree object store specific information on tree for StoSOO

Public fields

xMinRoot

[numeric] Minimum value of the root node (cell) in the tree

xMaxRoot

[numeric] Maximum value of the root node (cell) in the tree

xRepresentativeRoot

[numeric] Representative value of the root node (cell) in the tree

paramLen

[numeric] Number of parameters

nMaxEvalPerNode

[numeric] Maximum number of evaluations per leaf

widthBase

[numeric] Base of width of the estimates of rewards

maximizeFunc

[function] Function to be maximized given parameters scaled from 0 to 1.

funcScale

[numeric] Scale for function to be optimized. If 'maximize = TRUE', 'funcScale = 1', and else 'funcScale = -1'.

optimizeType

[character] Either 'deterministic' for optimizing a deterministic function or 'stochastic' for a stochastic one

nChildrenPerExpansion

[numeric] Number of children per expansion

maxDepth

[numeric] Maximum depth of the tree

withCheck

[logical] Check arguments for 'node', 'layer', and 'tree' class or not

verbose

[logical] Display information

iterationCounter

[numeric] Number of evaluations for the target function done in this tree object

rootNode

[numeric] Root node information ('node' class object)

rootLayer

[numeric] Root layer information ('layer' class object)

layersList

[numeric] List of layers ('layer' class object) in this tree

depths

[numeric] Depths of the layers in this tree

maxUcbValuesSoFar

[numeric] Maximum UCB value for the layers shallower than this layer

Active bindings

evaluateCurrentOptimalNode

[node] Evaluate the optimal node in the current tree

Methods

Public methods


Method new()

Create a new tree object

Usage
tree$new(
  xMinRoot = NULL,
  xMaxRoot = NULL,
  xRepresentativeRoot = NULL,
  paramLen = NULL,
  nMaxEvalPerNode,
  widthBase,
  maximizeFunc,
  funcScale,
  optimizeType,
  nChildrenPerExpansion,
  maxDepth,
  withCheck = FALSE,
  verbose = TRUE
)
Arguments
xMinRoot

[numeric] Minimum value of the root node (cell) in the tree

xMaxRoot

[numeric] Maximum value of the root node (cell) in the tree

xRepresentativeRoot

[numeric] Representative value of the root node (cell) in the tree

paramLen

[numeric] Number of parameters

nMaxEvalPerNode

[numeric] Maximum number of evaluations per leaf

widthBase

[numeric] Base of width of the estimates of rewards

maximizeFunc

[function] Function to be maximized given parameters scaled from 0 to 1.

funcScale

[numeric] Scale for function to be optimized. If 'maximize = TRUE', 'funcScale = 1', and else 'funcScale = -1'.

optimizeType

[character] Either 'deterministic' for optimizing a deterministic function or 'stochastic' for a stochastic one

nChildrenPerExpansion

[numeric] Number of children per expansion

maxDepth

[numeric] Maximum depth of the tree

withCheck

[logical] Check arguments for 'node', 'layer', and 'tree' class or not

verbose

[logical] Display information


Method performOneUpdate()

Update the tree information once

Usage
tree$performOneUpdate()

Method print()

Display information about the object

Usage
tree$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
tree$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


KosukeHamazaki/myBreedSimulatR documentation built on Aug. 31, 2024, 3:55 p.m.