Files
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

27 lines
482 B
PHP

<?php
namespace App\Models\Perceptrons;
class InputNeuron extends Perceptron
{
public function __construct(
) {
parent::__construct([]);
}
public function setInput(float $input): void
{
$this->input = $input;
}
public function test(array $inputs): array
{
return [$this->input];
}
public function activationFunction(float $input): float
{
return $input; // Identity function for input neurons
}
}