Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [kernel-smoothing]

Kernel smoothing techniques, such as kernel density estimation (KDE) and Nadaraya-Watson kernel regression, estimate functions by local interpolation from data points. Not to be confused with [kernel-trick], for the kernels used e.g. in SVMs.

6
votes
2answers
724 views

What did Silverman (1981) mean by 'critical bandwidth'?

In the selection of a bandwidth for a Kernel Density Estimator, critical bandwidth according to my understanding is: "For every integer k, where 1<k<n, we ...
1
vote
0answers
19 views

Can kernel density estimation be used to estimate a radial probability density?

I am trying to estimate the PDF of the radius of points distributed in a 2D plane. The points are distributed like this: I can produce a histogram of the radius data which looks like this: I want ...
0
votes
0answers
25 views

Derive the estimator for the integrated squared bias $\int \left(\operatorname{E}\hat{f} - f\right)^2 $

This problem is found in p. 77 of Wand & Jones' (1995) book. If you are familiar with nonparametric estimation you may skip this introduction. Suppose we want to minimize the integrated squared ...
1
vote
0answers
45 views

Plot the exact density of a transformation of a distribution

I would like to compute (and plot) the exact density of the following distribution: $ X_i \sim exp(-Exponential(\lambda)) - 0.5 $ I already have the estimated density for this distribution, but I ...
1
vote
0answers
30 views

Gaussian random fields: matrix and convolution sampling

I should be able to generate a stationary GRF from white noise in two different ways: multiplying the white noise vector by the square root of a covariance matrix with appropriate kernel; taking the ...
2
votes
0answers
64 views

Point process - intensity function vs probability density function

Suppose we have a point process in $\mathbb{R}$ with intensity $\lambda(x)$. Then, for a given compact set ${ S}$ we have $$\Lambda({ S})=\int_{\rm S} \lambda(x) \, dx,$$ where $\Lambda({ S})$ is ...
1
vote
1answer
35 views

How can I derive the function curve from a histogram of observed data

I'm analysing some datasets that produce heavy tailed data when plotted as a histogram. My initial goal was to attempt to fit a known distribution to my dataset. Thereafter I use to the properties of ...
0
votes
0answers
13 views

Is a kernel density estimate meaningful if > 25% of my data are duplicates?

The title pretty much says it all. I have data that consists of 80 samples but there are always at least four samples that have exactly the same value. I want to assess, whether the data is unimodal. ...
0
votes
0answers
11 views

What are the pitfals of using kernel density estimates to infer about the shape of an underlying distribution

I know that we cannot simply infer from the shape of a histogram to the shape of the underlying distribution, as the shape of the histogram is influenced by the choice of the intervals (Assessing ...
0
votes
1answer
27 views

Uniform kernel estimator

For practice, I'm trying to provide an estimation for a nonparametric model on dataset BMACS from library (npmlda). I'm having trouble to set up a kernel estimator with Uniform(-1/2,1/2) kernel and ...
2
votes
0answers
44 views

why not chosing always a spline?

I'm having a quite simple question: Why is a spline fit not the best choice everytime? In other words: How do I separate a spline fit from a kernel smoother or a polynomial in a meaningful way? I'm ...
0
votes
0answers
11 views

Bayesian information criterion (BIC) on KDE?

Consider two datasets, $X$ and $Y$. Both have 2 dimensions with $a$ and $b$ samples respectively. I would like to test whether one kernel density estimate (KDE) on the concatenated data ($XY$, shape $...
4
votes
2answers
52 views

How to compare a new measurement to an existing multivariate distribution?

I have a dataset that describes the position and rotation of an object at different points in time using four dimensions. I want to use this sample of observations to get a sense of what positions and ...
1
vote
0answers
20 views

RKHS norm and Fourier transform link

In the notes here, it is stated that norms of some reproducing kernel Hilbert spaces can be written in terms of Fourier transforms, and this is often used to argue that a higher RKHS norm implies a ...
3
votes
0answers
43 views

Gradient Descent in Metric Learning for Kernel Regression (MLKR)

I am currently studying the Metric Learning for Kernel Regression (MLKR) algorithm (http://proceedings.mlr.press/v2/weinberger07a/weinberger07a.pdf). Let $\{(x_{1}, y_{1}), ..., (x_{N}, y_{N})\}$ ...
0
votes
0answers
10 views

Moments of the leave-one-out cross-validation function

Has someone studied the properties (particularly the first two moments) of the leave-one-out cross-validation function in the context bandwidth selection in kernel regression? Namely, if we have a ...
0
votes
0answers
31 views

fitting ecdf() to binned counts/proportions in R

Suppose I have observed data in a cumulative percentage (or cumulative counts) format like this: ...
0
votes
0answers
22 views

Validate a model with Posterior Predictive Checks, Kernel Density estimation and Kullback-Leibler

I'm wondering if this scheme is a good way to validate a model. Generate new data $y_{new}$ from Posterior Predictive distribution PPC given observed data $y_{obs}$ Use Kernel Density Estimation in ...
1
vote
0answers
11 views

Cluster/partition by time

I have a dataset of different events in time. I want to group/cluster/partition the data by datetime. A small example of the time of the data might be: [19-09-2018 12:00, 19-09-2018 12:01, 19-09-2018 ...
0
votes
1answer
84 views

MSE of Kernel Density Estimator

Erlang Kernel is used for density estimation. By using this estimates are pretty close to the real density on graph on the other side MSE is very large. But Author of Erlang Kernel stated that it will ...
0
votes
1answer
60 views

Bandwidth Selection Methods

Are there more methods for calculating the bandwidth in a kernel regression? So far I found Cross Validation Methods and a Bayesian approach (by Zhang, Brooks and King).
2
votes
0answers
37 views

How to aggregate histograms for density estimation

Within a very large sensor network, each node does take measurements derived from a fixed number of samples taken at a high frequency from an instrument. The number of measurements send to an ...
0
votes
1answer
61 views

Python KDE plot for a value and not a count

I'm using a KDE plot to analyze the distribution of a sample population in terms of count by division. However, if I want to see how that distribution looks by some value (for example, dollar amount),...
0
votes
1answer
57 views

Are kernel Density estimation and gaussian blur related?

I have a set of points in a 2d space representing location of animals. I am interested in a probability heatmap which give lower values for cells far from these locations. I have seen many ...
0
votes
1answer
85 views

Kernel density estimation: kernel MISE (vs Epanechnikov)

In most places where I've looked, it generally says that the Epanechnikov kernel is optimal for kernel density estimation (KDE), in the sense that it minimizes the mean integrated squared error (MISE)....
0
votes
0answers
52 views

Is it possible to compute a bivariate (gaussian) kernel density estimation with a GAM model?

I regularly compute bivariate density estimation with Gaussian kernels, using functions specifically made for this (e.g., in R, the kde2d function). Recently reading literature on generalized ...
0
votes
0answers
44 views

Continously display probability for Bernoulli trials (kde?)

Is there a way to display probability for Bernoulli trials (outcome only 0 or 1). Data would look like this: timestamp,outcome t1,0 t2,1 t3,0 t4,0 I have ~1000 ...
0
votes
1answer
24 views

How to find the maximum probability of an hourly based variable ?

Let's say my dataset is composed by the time (hour) of when a user uses his TV, over a month. I may have something like this : ...
0
votes
0answers
53 views

How does one compare density curves/histograms?

I am undergrad student and beginner with R working on a project that looks on eye movements while reading text. I am now trying to find Areas of Interests (AOI) which are here defined by an increased ...
0
votes
0answers
52 views

Kernel Density Plot

I want to know what the underlying distribution of my data, I have used kernel density plot to find the distribution of my data. Code: ...
2
votes
0answers
193 views

Normalization of convolution kernel

I am trying to smooth a noisy one-dimensional physical signal, y, while retaining correspondence between the signal's amplitude and its units. I'm applying a ...
0
votes
1answer
339 views

Bandwidth parameters in multivariate KDE using scipy.stats.gaussian_kde

I am working on a project which involves implementing in Python two different density estimation functions over multivariate data; one using N-d histograms and the other using kernel density ...
1
vote
0answers
30 views

Inconsistency of kernel intensity estimator

I have read that the kernel intensity estimator of a point process is not consistent, because the variance at any point is "of order 1". What does he mean by "of order 1"? I would like to understand ...
4
votes
1answer
51 views

Why isn't mean integrated square error (MISE) probability-weighted?

We often try to minimize the MISE of a KDE: $\text{E}_{\mathbb{P}^n}[\int (\hat{p}(x) - p(x))^2 dx]$. Why don't we instead try to minimize $\text{E}_{\mathbb{P}^n}[\int (\hat{p}(x) - p(x))^2 p(x) dx]$,...
0
votes
0answers
90 views

Draw line through 2d density plot

have a large dataset of gene expression from ~10,000 patient samples (TCGA), and I'm plotting a predicted expression value (x) and the actual observed value (y) of a certain gene signature. For my ...
0
votes
0answers
53 views

Kernel regression: Bandwidth selection on subsample

I have two columns of data which I sort by size (ascending) of the second column. I now want to execute a kernel regression on the first column (Nadaraya-Watson estimator) and I am interested in only ...
0
votes
0answers
154 views

Multivariate KDE with Epanechnikov kernel

I try to code this paper : "Background subtraction for freely moving cameras". With the first part of the paper, I obtained two sets of feature points (background and foreground). With the second part,...
1
vote
1answer
68 views

finding quantiles of a kernel density estimation

I used R to find kernel density estimates of my dataset (for experiment I used 1000 samples generated from a known distribution in this step). I used code density()...
3
votes
0answers
75 views

Thompson sampling with adaptive kernel density estimation

This is an extension to this question, which is about handling arbitrary (potentially unbounded) reward distributions for the multi-armed bandit problem. Given a sequence of observed rewards $r_t \in \...
-4
votes
2answers
553 views

Sample multivariate PDF from KDE with different norm [closed]

I am using KDE with a modified metric for the distance. The PDF is as expected (see below: color is the probability and the dot is the point used to fit the KDE). But due to the new metric, I cannot ...
0
votes
0answers
82 views

The Nadaraya-Watson estimator with different lag

I am currently working on kernel density estimation with the Nadaraya-Watson estimator. My goal is to model a time series. With a lag of 4 this works fine. Here is the code in R: construction of the ...
1
vote
1answer
36 views

Mean Integrated Square Error

I'm evaluating several methods to estimate the density of an unknown distribution $f$ from observed data, among which kernel density estimation with distinct kernel functions, a mixture density ...
2
votes
1answer
123 views

Density estimation using (different) order statistics

I need to estimate a univariate distribution $F$ as flexibly as possible. However, I do not observe draws from $F$ directly. Each observation $x_i$ is the minimum of $a_i$ draws from $F$, where $a_i$ ...
2
votes
0answers
76 views

Implementation of time-varying coefficients model for Cox regression

I would like to implement the time-varying coefficients model (cf. Fan and Zhang, 1999) for a Cox proportional hazards model, as proposed by Cai and Sun (2003), and studied by Tian, Zucker and Wei (...
1
vote
0answers
55 views

Bootstrap Resampling Vs KDE Resampling

Let $\xi\in\mathbb{R}^{m}$ be a random vector with joint desity function $f$, and let $\widehat{\xi}_{1},\ldots,\widehat{\xi}_{N}$ be a sample of $\xi$. We have that the kernel density estimator (...
0
votes
0answers
14 views

Is there a numerical estimate of the MISE (Mean Integrated Square Error)?

Without knowing the true density of a sample, is it possible to numerically estimate the MISE of a density estimate? Is there a commonly used method?
1
vote
1answer
51 views

convolution and deconvolution of random variables of different dimensions

Preliminary: Let's say we have $Y=X+Z$ ($Y$ is data, $X$ is latent variable and $Z$ is noise), where the random variables are all in $\mathbb{R}$. Then an inverse Fourier transform leads to \begin{...
0
votes
0answers
162 views

same level scale in two stat_density2d plots in R

I am trying to plot and compare two kernel density plots with ggplot, but the problem that I found is that I am not able to set the color scale to make them comparable. One goes from 0 to 1.8 and the ...
1
vote
0answers
85 views

Density of features from density of principal components

I have used principal component analysis for dimensionality reduction on large number of features. But after some stack of unsupervised learning, I have calculated kernel densities for all these ...
0
votes
0answers
9 views

accuracy conditional on feature values

I have a binary classification model and I would like to estimate the accuracy as a function of another variable. To be clearer, I can compute the usual accuracy on the testset: $$ acc = \frac{\...