Refactored into folders
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Events\PerceptronTrainingEnded;
|
||||
use App\Services\DataSetReader;
|
||||
use App\Services\IPerceptronIterationEventBuffer;
|
||||
use App\Services\DatasetReader\IDataSetReader;
|
||||
use App\Services\IterationEventBuffer\IPerceptronIterationEventBuffer;
|
||||
|
||||
abstract class NetworkTraining
|
||||
{
|
||||
@@ -17,7 +17,7 @@ abstract class NetworkTraining
|
||||
public ActivationsFunctions $activationFunction;
|
||||
|
||||
public function __construct(
|
||||
protected DataSetReader $datasetReader,
|
||||
protected IDataSetReader $datasetReader,
|
||||
protected int $maxEpochs,
|
||||
protected IPerceptronIterationEventBuffer $iterationEventBuffer,
|
||||
protected string $sessionId,
|
||||
@@ -42,4 +42,11 @@ abstract class NetworkTraining
|
||||
protected function addIterationToBuffer(float $error, array $synapticWeights) {
|
||||
$this->iterationEventBuffer->addIteration($this->epoch, $this->datasetReader->getLastReadLineIndex(), $error, $synapticWeights);
|
||||
}
|
||||
|
||||
public function getEpoch(): int
|
||||
{
|
||||
return $this->epoch;
|
||||
}
|
||||
|
||||
abstract public function getSynapticWeights(): array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user