Files
Reseaux-de-neurones-artific…/app/Models/SimpleBinaryPerceptron.php
Matthias Guillitte f0e7be4476
Some checks failed
linter / quality (push) Failing after 18s
tests / ci (8.4) (push) Failing after 10s
tests / ci (8.5) (push) Failing after 11s
Gradient descent training + Added all dataset + graphs improvements
2026-03-13 22:06:08 +01:00

19 lines
341 B
PHP

<?php
namespace App\Models;
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;
}
}