Learn R Programming

modello (version 0.1.1)

.opt: Root R6 class representing a generic optmiser

Description

Root R6 class representing a generic optmiser

Root R6 class representing a generic optmiser

R6 class representing a SGD optmiser

R6 class representing a SGD optmiser

R6 class representing a SGDWM optmiser

R6 class representing a SGDWM optmiser

R6 class representing an Adam optmiser

R6 class representing an Adam optmiser

Arguments

Methods

Public methods

Method new()

Initialise the reference object of class 'opt'

Usage

.opt$new(name)

Arguments

name

number name

Method finalize()

Awares of a reference object associated to an existing number is removed

Usage

.opt$finalize()

Method name()

Returns the name of the optimiser.

Usage

.opt$name()

Returns

Returns the name of the optmiser

Method id()

Returns the id of the optmiser (i.e. its position index in the OPTS_ array).

Usage

.opt$id()

Returns

Returns the id of the optmiser

Method pop()

Pop (removes) the optmiser from the OPTS_ array.

Usage

.opt$pop()

Returns

Returns invisible self

Method is.linked()

Checks that the reference object is linked to a optmiser

Usage

.opt$is.linked()

Returns

Retursn TRUE if is linked, FALSE otherwise

Method print()

Prints a representation of the optmiser

Usage

.opt$print()

Method clone()

The objects of this class are cloneable with this method.

Usage

.opt$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super class

modello::.opt -> sgd.opt

Methods

Public methods

Method step()

Performs niter SGD steps

Usage

.sgd.opt$step(g, j, lr, niter)

Arguments

g

reference object of class 'graph' containing the computational graph of the objective function

j

refernence object of class 'number' represeting the output of the objective function

lr

learning rate

niter

number of steps

Method clone()

The objects of this class are cloneable with this method.

Usage

.sgd.opt$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super class

modello::.opt -> sgdwm.opt

Methods

Public methods

Method step()

Performs niter SGDWM steps

Usage

.sgdwm.opt$step(g, j, lr, alpha, niter)

Arguments

g

reference object of class 'graph' containing the computational graph of the objective function

j

refernence object of class 'number' represeting the output of the objective function

lr

learning rate

alpha

momentum parameter

niter

number of steps

Method clone()

The objects of this class are cloneable with this method.

Usage

.sgdwm.opt$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super class

modello::.opt -> adam.opt

Methods

Public methods

Method step()

Performs niter Adam steps

Usage

.adam.opt$step(g, j, lr, beta1, beta2, niter)

Arguments

g

reference object of class 'graph' containing the computational graph of the objective function

j

refernence object of class 'number' represeting the output of the objective function

lr

learning rate

beta1

first order momentum parameter

beta2

second order momentum parameter

niter

number of steps

Method clone()

The objects of this class are cloneable with this method.

Usage

.adam.opt$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Object of this class are created by the '.modello' session object that linkes them with the corresponding optimiser in the FORTRAN environment.