Cho
Cho

Reputation: 163

Applying other kernel functions in pandas plot

I would like to know what function are used for kde plot in pandas. I also want to know how to change kde's kernel function in pandas.

df.plot.kde();

I'm still studying this feature, but the default looks like a Gaussian function.

Upvotes: 1

Views: 611

Answers (1)

Joe
Joe

Reputation: 12417

You can change the kernel in this way:

 kde = KernelDensity(kernel='gaussian', bandwidth=0.2).fit(X)

where kernel can be: 'gaussian', 'tophat', 'epanechnikov', 'exponential', 'linear' and 'cosine'. Take a better look here: http://scikit-learn.org/stable/modules/density.html

Upvotes: 1

Related Questions