Skip to content

Commit

Permalink
Fix normalising constant in quartic kernel
Browse files Browse the repository at this point in the history
Fixes #60616
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Feb 17, 2025
1 parent 06914a9 commit aada46b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/raster/qgskde.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ double QgsKernelDensityEstimation::quarticKernel( const double distance, const d
case OutputScaled:
{
// Normalizing constant
const double k = 116. / ( 5. * M_PI * std::pow( bandwidth, 2 ) );
const double k = 16. / ( 5. * M_PI * std::pow( bandwidth, 2 ) );

// Derived from Wand and Jones (1995), p. 175
return k * ( 15. / 16. ) * std::pow( 1. - std::pow( distance / bandwidth, 2 ), 2 );
Expand Down

0 comments on commit aada46b

Please # to comment.