Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Phpml\Helper\Optimizer\Optimizer Class Reference
Inheritance diagram for Phpml\Helper\Optimizer\Optimizer:
Phpml\Helper\Optimizer\StochasticGD Phpml\Helper\Optimizer\GD Phpml\Helper\Optimizer\ConjugateGradient

Public Member Functions

 __construct (int $dimensions)
 Inits a new instance of Optimizer for the given number of dimensions.
 
 runOptimization (array $samples, array $targets, Closure $gradientCb)
 Executes the optimization with the given samples & targets and returns the weights.
 
 setTheta (array $theta)
 
 theta ()
 

Protected Attributes

int $dimensions
 Number of dimensions.
 
array $theta = []
 

Constructor & Destructor Documentation

◆ __construct()

Phpml\Helper\Optimizer\Optimizer::__construct ( int $dimensions)

Inits a new instance of Optimizer for the given number of dimensions.

Reimplemented in Phpml\Helper\Optimizer\StochasticGD.

Member Function Documentation

◆ runOptimization()

Phpml\Helper\Optimizer\Optimizer::runOptimization ( array $samples,
array $targets,
Closure $gradientCb )
abstract

Executes the optimization with the given samples & targets and returns the weights.

Reimplemented in Phpml\Helper\Optimizer\ConjugateGradient, Phpml\Helper\Optimizer\GD, and Phpml\Helper\Optimizer\StochasticGD.


The documentation for this class was generated from the following file: