且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在内核密度估计中找到局部最大值?

更新时间:2021-10-28 01:02:07

您将要使用称为的算法均值移位.它是一种聚类算法,可以通过找到KDE的模式(f(x)的最大值)来工作.请注意,为您的KDE设置的带宽将影响模式的数量及其位置.由于您使用的是python,因此 scikit-learn .

You will want to use an algorithm called Mean Shift. Its a clustering algorithm that works by finding the modes (aka maxima of f(x)) of the KDE. Note that the bandwidth set for your KDE will impact the number of modes and their locations. Since you are using python, there is an implementation in scikit-learn.