epoch >= $this->maxEpochs) { $message = 'Le nombre maximal d\'époques a été atteint'; if ($finalError) { $message .= " avec une erreur finale de $finalError"; } event(new PerceptronTrainingEnded($message, $this->sessionId, $this->trainingId)); } } protected function broadcastTrainingEnded(string $reason): void { $this->iterationEventBuffer->flush(); event(new PerceptronTrainingEnded($reason, $this->sessionId, $this->trainingId)); } protected function addIterationToBuffer(float $error, array $synapticWeights) { $this->iterationEventBuffer->addIteration($this->epoch, $this->datasetReader->getLastReadLineIndex(), $error, $synapticWeights); } public function getEpoch(): int { return $this->epoch; } abstract public function getSynapticWeights(): array; }