I'm familiar with the usual Kernel density estimation (KDE) where a single bandwidth value is used to generate a multivariate (usually Gaussian) function for each sample point. The final KDE is then obtained by summing the Gaussian functions for all the sample points.
Say I have N sample points (assume in 1 dimension) each one with an error estimate, e.g.:
sample_points = [0.5, 0.7, 0.3, 1.2, 0.01, 3.6, 0.4]
errors = [0.02, 0.03, 0.05, 0.01, 0.03, 0.01, 0.07]
What I'm after, is a way to obtain the KDE for this sample using the error associated to each point as the bandwidth for its function.
I could eventually do this by manually obtaining the Gaussian kernel for each point separately, and then combining all the functions (no easy task).
Is there an already implemented function that does this? I've looked around but the kernel density estimator functions I found (scipy.stats.gaussian_kde, sklearn.neighbors.KernelDensity) use a fixed bandwidth value for all the points.