tcrm icon indicating copy to clipboard operation
tcrm copied to clipboard

Missing bandwidth giving errors in KDEParameters.py?

Open KayShelton opened this issue 4 years ago • 1 comments

In the _generatePDF function in the StatInterface/KDEParameters script, bandwidth (bw) is passed to the function, but not actually used in the kde.fit call. Is this intentional?

It results in bandwidth being re-calculated in the kde.fit, and sometimes coming back as zero, when it has been calculated as non-zero previously.

Passing bw=bw to the kde.fit call resolves the issue, but I wanted to make sure there wasn't a reason it had been left off.

KayShelton avatar Aug 13 '20 14:08 KayShelton

Noted @KayShelton. In part, the bw argument possibly should be ignored in preference to calculating the bandwidth in kde.fit, where the calculation is dependent on the choice of kernel. The bw argument value is based on the normal_reference option in kde.fit, which is suitable for gaussian kernels, but not other options.

wcarthur avatar Nov 13 '20 03:11 wcarthur