Files
Reseaux-de-neurones-artific…/app/Models/Perceptrons/SimpleBinaryPerceptron.php
Matthias Guillitte ef90236adc
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
Fix linting
2026-03-23 08:44:50 +01:00

18 lines
351 B
PHP

<?php
namespace App\Models\Perceptrons;
class SimpleBinaryPerceptron extends Perceptron
{
public function __construct(
array $synaptic_weights,
) {
parent::__construct($synaptic_weights);
}
public function activationFunction(float $weighted_sum): float
{
return $weighted_sum >= 0.0 ? 1.0 : 0.0;
}
}