Skip to content

Commit

Permalink
Merge branch 'master' into 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed May 23, 2024
2 parents 66da330 + 696a2f6 commit 7f03b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AnomalyDetectors/LocalOutlierFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ protected function localOutlierFactor(array $sample) : float
{
[$samples, $indices, $distances] = $this->tree->nearest($sample, $this->k);

$lrd = $this->localReachabilityDensity($indices, $distances);
$lrd = $this->localReachabilityDensity($indices, $distances) ?: EPSILON;

$ratios = [];

Expand Down

0 comments on commit 7f03b69

Please sign in to comment.