Gradient descent training + Added all dataset + graphs improvements
This commit is contained in:
@@ -12,7 +12,7 @@ abstract class Perceptron extends Model
|
||||
$this->synaptic_weights = $synaptic_weights;
|
||||
}
|
||||
|
||||
public function test(array $inputs): int
|
||||
public function test(array $inputs): float
|
||||
{
|
||||
$inputs = array_merge([1], $inputs); // Add bias input
|
||||
|
||||
@@ -24,7 +24,7 @@ abstract class Perceptron extends Model
|
||||
return $this->activationFunction($weighted_sum);
|
||||
}
|
||||
|
||||
abstract public function activationFunction(float $weighted_sum): int;
|
||||
abstract public function activationFunction(float $weighted_sum): float;
|
||||
|
||||
public function getSynapticWeights(): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user