MCordingley\Regression\Algorithm\GradientDescent\Schedule\Adagrad::step PHP 메소드

step() 공개 메소드

public step ( integer $featureIndex ) : float
$featureIndex integer
리턴 float
    public function step(int $featureIndex) : float
    {
        return $this->stepSize / ($this->eta + sqrt($this->sumSquaredGradient[$featureIndex]));
    }

Usage Example

예제 #1
0
 public function testStep()
 {
     $schedule = new Adagrad(0.01, 1.0E-6);
     $schedule->update([1.0]);
     static::assertEquals(0.009999990000010001, $schedule->step(0));
 }