Files
Reseaux-de-neurones-artific…/app/Models/SimplePerceptron.php
Matthias Guillitte 83b7aa3f3a
Some checks failed
linter / quality (push) Failing after 7s
tests / ci (8.4) (push) Failing after 6s
tests / ci (8.5) (push) Failing after 5s
Added configuration panel datasets, back-end refactor and others
2026-03-12 16:38:50 +01:00

19 lines
327 B
PHP

<?php
namespace App\Models;
class SimplePerceptron extends Perceptron {
public function __construct(
array $synaptic_weights,
) {
parent::__construct($synaptic_weights);
}
public function activationFunction(float $weighted_sum): int
{
return $weighted_sum >= 0 ? 1 : 0;
}
}