Skip to content

Commit

Permalink
Merge branch 'master' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed May 23, 2024
2 parents 19aecd1 + 696a2f6 commit 15726a4
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 15726a4

Please sign in to comment.