tcrm
tcrm copied to clipboard
Missing bandwidth giving errors in KDEParameters.py?
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.
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.