Renamed tests + added some + misc
This commit is contained in:
@@ -10,7 +10,7 @@ use Tests\Services\IterationEventBuffer\DullIterationEventBuffer;
|
||||
class ADALINEPerceptronTest extends TrainingTestCase
|
||||
{
|
||||
|
||||
public function test_simple_perceptron_training_logic_and()
|
||||
public function test_adaline_perceptron_training_logic_and()
|
||||
{
|
||||
$training = new ADALINEPerceptronTraining(
|
||||
datasetReader: new LinearOrderDataSetReader(public_path('data_sets/logic_and_gradient.csv')),
|
||||
@@ -31,7 +31,7 @@ class ADALINEPerceptronTest extends TrainingTestCase
|
||||
);
|
||||
}
|
||||
|
||||
// public function test_simple_perceptron_training_table_2_9()
|
||||
// public function test_adaline_perceptron_training_table_2_9()
|
||||
// {
|
||||
// $training = new ADALINEPerceptronTraining(
|
||||
// datasetReader: new LinearOrderDataSetReader(public_path('data_sets/table_2_9.csv')),
|
||||
@@ -50,4 +50,25 @@ class ADALINEPerceptronTest extends TrainingTestCase
|
||||
// expectedEpochs: 92
|
||||
// );
|
||||
// }
|
||||
|
||||
public function test_adaline_perceptron_training_table_2_10()
|
||||
{
|
||||
$training = new ADALINEPerceptronTraining(
|
||||
datasetReader: new LinearOrderDataSetReader(public_path('data_sets/table_2_10.csv')),
|
||||
learningRate: 0.0015,
|
||||
maxEpochs: 1000,
|
||||
synapticWeightsProvider: new ZeroSynapticWeights(),
|
||||
iterationEventBuffer: new DullIterationEventBuffer(),
|
||||
sessionId: 'test-session',
|
||||
trainingId: 'test-training',
|
||||
// minError: 16.597077, // Impossible pour un dataset avec des labels -1 et 1 d'avoir une erreur moyenne supérieure à 2
|
||||
minError: 0.000000001,
|
||||
);
|
||||
|
||||
$this->verifyTrainingResults(
|
||||
training: $training,
|
||||
expectedWeights: [[[-0.022673, -0.25422, 0.294955]]],
|
||||
expectedEpochs: 1000
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user