Fix linting
Some checks failed
linter / quality (push) Failing after 6m26s
tests / ci (8.4) (push) Successful in 5m6s
tests / ci (8.5) (push) Successful in 5m38s

This commit is contained in:
2026-03-23 08:44:50 +01:00
parent 9d4b02fab5
commit ef90236adc
32 changed files with 123 additions and 113 deletions

View File

@@ -3,9 +3,9 @@
namespace App\Models\NetworksTraining;
use App\Events\PerceptronTrainingEnded;
use App\Models\ActivationsFunctions;
use App\Services\DatasetReader\IDataSetReader;
use App\Services\IterationEventBuffer\IPerceptronIterationEventBuffer;
use App\Models\ActivationsFunctions;
abstract class NetworkTraining
{
@@ -13,7 +13,6 @@ abstract class NetworkTraining
/**
* @abstract
* @var ActivationsFunctions
*/
public ActivationsFunctions $activationFunction;
@@ -23,13 +22,14 @@ abstract class NetworkTraining
protected IPerceptronIterationEventBuffer $iterationEventBuffer,
protected string $sessionId,
protected string $trainingId,
) {
}
) {}
abstract public function start(): void;
abstract public function start() : void;
abstract protected function stopCondition(): bool;
protected function checkPassedMaxIterations(?float $finalError) {
protected function checkPassedMaxIterations(?float $finalError)
{
if ($this->epoch >= $this->maxEpochs) {
$message = 'Le nombre maximal d\'epoch a été atteint';
if ($finalError) {
@@ -40,7 +40,8 @@ abstract class NetworkTraining
}
}
protected function addIterationToBuffer(float $error, array $synapticWeights) {
protected function addIterationToBuffer(float $error, array $synapticWeights)
{
$this->iterationEventBuffer->addIteration($this->epoch, $this->datasetReader->getLastReadLineIndex(), $error, $synapticWeights);
}