EdwardRaff / JSAT

Java Statistical Analysis Tool, a Java library for Machine Learning
GNU General Public License v3.0
789 stars 205 forks source link

Kernal Density Estimation #70

Closed blankFY closed 7 years ago

blankFY commented 7 years ago

Hi, I have a 1D array of some certain values.I want to plot the kernel density estimation of my array. I want to play with the bandwidth and all. I have been using matlab and there I have a function called ksdensity. Now I want to create a kernel density estimation using python.The existing algorithm can not give me results as matlab. Could you please help me, How can I find the kernel density estimation of a 1D array.? Thank you.

EdwardRaff commented 7 years ago

The KernelDensityEstimator class is specifically for 1D data, and allows you to query it as a probability distribution. You can use the setBandwith method to change the bandwidth.