PHP Class MCordingley\Regression\Algorithm\GradientDescent\StoppingCriteria\GradientNorm

Good for Batch descent, when the gradient is fairly stable from one iteration to the next. Not so good for Stochastic descent and MiniBatch with small batch sizes, as those gradients won't settle near zero even as the weights converge.
Inheritance: implements MCordingley\Regression\Algorithm\GradientDescent\StoppingCriteria\StoppingCriteria
ファイルを表示 Open project: mcordingley/regression Class Usage Examples

Public Methods

Method Description
__construct ( float $eta = 6.103515625E-5, integer $pNorm = 2 )
converged ( array $gradient, array $coefficients ) : boolean

Method Details

__construct() public method

public __construct ( float $eta = 6.103515625E-5, integer $pNorm = 2 )
$eta float
$pNorm integer

converged() public method

public converged ( array $gradient, array $coefficients ) : boolean
$gradient array
$coefficients array
return boolean