Files
Reseaux-de-neurones-artific…/app/Models/Perceptrons/SimpleBinaryPerceptron2.php
Matthias Guillitte 2f4db07918
All checks were successful
linter / quality (push) Successful in 6m16s
tests / ci (8.4) (push) Successful in 4m10s
tests / ci (8.5) (push) Successful in 4m29s
MonoLayer Perceptron
2026-04-04 16:45:04 +02:00

19 lines
386 B
PHP

<?php
namespace App\Models\Perceptrons;
class SimpleBinaryPerceptron2 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 : -1.0;
return $weighted_sum;
}
}