Search code examples
python-3.xscikit-learnkernel-density

sampling from sklearn Kernel Density estimation


I'm using the sample() method for a KernelDensity that is fitted to my data's percentage changes. Are the samples from the sample method in the same units as my input data? I ask because documentation says that for the score_sample() method it actually returns the log density and I just want to make sure the same doesn't happen with the sample method or if there's a need to adjust the output.


Solution

  • Answer: yes, the sample is in the same unit as my input data. I checked carefully and with a cold head :)