PHP Class MCordingley\Regression\Algorithm\GradientDescent\GradientDescent

Inheritance: implements MCordingley\Regression\Algorithm\Algorithm
Mostra file Open project: mcordingley/regression Class Usage Examples

Protected Properties

Property Type Description
$gradient MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient

Public Methods

Method Description
__construct ( MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient $gradient, MCordingley\Regression\Algorithm\GradientDescent\Schedule\Schedule $schedule, MCordingley\Regression\Algorithm\GradientDescent\StoppingCriteria\StoppingCriteria $stoppingCriteria )
regress ( Observations $observations ) : array

Protected Methods

Method Description
calculateGradient ( Observations $observations, array $coefficients ) : array

Private Methods

Method Description
updateCoefficients ( array $coefficients, array $gradient ) : array

Method Details

__construct() public method

public __construct ( MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient $gradient, MCordingley\Regression\Algorithm\GradientDescent\Schedule\Schedule $schedule, MCordingley\Regression\Algorithm\GradientDescent\StoppingCriteria\StoppingCriteria $stoppingCriteria )
$gradient MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient
$schedule MCordingley\Regression\Algorithm\GradientDescent\Schedule\Schedule
$stoppingCriteria MCordingley\Regression\Algorithm\GradientDescent\StoppingCriteria\StoppingCriteria

calculateGradient() abstract protected method

abstract protected calculateGradient ( Observations $observations, array $coefficients ) : array
$observations MCordingley\Regression\Observations
$coefficients array
return array

regress() final public method

final public regress ( Observations $observations ) : array
$observations MCordingley\Regression\Observations
return array

Property Details

$gradient protected_oe property

protected Gradient,MCordingley\Regression\Algorithm\GradientDescent\Gradient $gradient
return MCordingley\Regression\Algorithm\GradientDescent\Gradient\Gradient