Fix linting
This commit is contained in:
@@ -52,7 +52,7 @@ class ADALINEPerceptronTraining extends NetworkTraining
|
||||
$synaptic_weights = $this->perceptron->getSynapticWeights();
|
||||
$inputs_with_bias = array_merge([1], $inputs); // Add bias input
|
||||
$new_weights = array_map(
|
||||
fn($weight, $weightIndex) => $weight + ($this->learningRate * $iterationError * $inputs_with_bias[$weightIndex]),
|
||||
fn ($weight, $weightIndex) => $weight + ($this->learningRate * $iterationError * $inputs_with_bias[$weightIndex]),
|
||||
$synaptic_weights,
|
||||
array_keys($synaptic_weights)
|
||||
);
|
||||
@@ -73,7 +73,7 @@ class ADALINEPerceptronTraining extends NetworkTraining
|
||||
$this->epochError /= $this->datasetReader->getEpochExamplesCount(); // Average error for the epoch
|
||||
|
||||
$this->datasetReader->reset(); // Reset the dataset for the next iteration
|
||||
} while ($this->epoch < $this->maxEpochs && !$this->stopCondition());
|
||||
} while ($this->epoch < $this->maxEpochs && ! $this->stopCondition());
|
||||
|
||||
$this->iterationEventBuffer->flush(); // Ensure all iterations are sent to the frontend
|
||||
|
||||
@@ -86,6 +86,7 @@ class ADALINEPerceptronTraining extends NetworkTraining
|
||||
if ($condition === true) {
|
||||
event(new PerceptronTrainingEnded('Le perceptron à atteint l\'erreur minimale', $this->sessionId, $this->trainingId));
|
||||
}
|
||||
|
||||
return $condition;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user