Skip to content

Commit

Permalink
Update OneClassSVM.php
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisAUTHIE authored Nov 1, 2024
1 parent 011b52f commit 851df84
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/AnomalyDetectors/OneClassSVM.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ public function train(Dataset $dataset) : void
$data = [];

foreach ($dataset->samples() as $sample) {
$sample_array = $sample;
array_unshift($sample_array, 1);
$data[] = $sample_array;
array_unshift($sample, 1);
$data[] = $sample;
}

$this->model = $this->svm->train($data);
Expand Down

0 comments on commit 851df84

Please sign in to comment.