Questions tagged [kernel-density]

kernel density estimation is a non-parametric way to estimate the probability density function of a random variable.

Kernel density estimation is a fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. Kernel density estimates are closely related to histograms, but can be endowed with properties such as smoothness or continuity by using a suitable kernel

http://en.wikipedia.org/wiki/Kernel_density_estimation

656 questions
0
votes
0 answers

R: Shift of resulting image after kernel2d

I've a strange problem after applying the kernel2d R code on my images. The resulting density plot is shifted several pixels (up & right side). I load my image, threshold it (until now the images are perfectly overlapping). Then I generate a list…
Durin
  • 687
  • 1
  • 8
  • 18
0
votes
1 answer

Divide density distributions in R

I would like to divide two density distributions (or two histograms) in R. I would even take "subtract one from the other using an operator" -- but I don't see an obvious way to do it, other than sample and subtract/divide the long way. Is there a…
0
votes
3 answers

Plotting three densities on the same graph in different line patterns with titles etc

I am very, very new to R so please forgive the basic nature of my question. In short, I have done a lot of Google searching to try to answer this, but I find that even the basic guides available, and simple discussions on forums are assuming more…
user2439887
  • 61
  • 1
  • 11
0
votes
1 answer

Densityplots using colwise - different colors for each line?

I need a plot of different density lines, each in another color. This is an example code (but much smaller), using the built-in data.fame USArrests. I hope it is ok to use it? colors <- heat.colors(3) plot(density(USArrests[,2], bw=1,…
May6
  • 47
  • 7
0
votes
1 answer

Image Scaling is not working properly

I am working on a complex UI design it is like circular wheel containing 10 icons in circular locus. i need to scale every icon as per the device resolution. Please have a look for specific code snippet:- if (displayWidth<=241) { …
Suresh Sharma
  • 1,826
  • 22
  • 41
0
votes
1 answer

Finding The Max Value from Plotted Density Function (Kernel Density Estimation) in R

I have some data I that I'm assuming comes from a distribution and I'm trying to estimate that distribution. Right now I'm using the package KernSmooth in R with a Gaussian kernel and am using the package's dpik() function to automatically select my…
msabin
  • 1
  • 1
  • 1
-1
votes
0 answers

How to setup and evaluate a fast Gaussian Kernel

I have a Gaussian Kernel with 100,000 points, that fits some kind of probability distribution. However, I am having trouble evaluate points on the Kernel. For example, let's say I have a 2D Gaussian Kernel setup on 100,000 2D vectors. Now, I have a…
-1
votes
1 answer

Scikit Learn KernelDensity and GridSearchCV

I am new to data science and doing a project about Kernel Density Estimation, specifically about finding the best bandwidth and kernel function to use. I want to use Scikit Learn's KernelDensity which allows choosing the bandwidth and the kernel. I…
-1
votes
1 answer

KDE - Is there something wrong in scipy or numpy? Or is it something I am doing?

I am simply trying to follow an example: https://medium.com/swlh/how-to-analyze-volume-profiles-with-python-3166bb10ff24 I am only on the second step and I am getting errors. Here is my code: # Load data df =…
Jacob
  • 15
  • 1
  • 4
-1
votes
1 answer

Is there a way to apply Kernel density estimation on data where each 2-D data point has an associated value?

I am attempting to apply a KDE to my data which is structured as follows: |x axis values|: 1, 2, 3, ... |y axis values|: 5, 8, 10, ... |coord point values|: 98, 35, 15, ... I am able to apply the KDE to the X-Y coordinate pairs and estimate the…
user2852630
  • 39
  • 1
  • 8
-1
votes
1 answer

Plotting probability distribution of data using sklearn's KDE function

I have a number of samples of a variable. I would like to use these samples to plot the probability distribution of the variable. I'm using kernel density estimation with a Gaussian kernel. I'm using sklearn library for this purpose. Here is the…
-1
votes
1 answer

Constant bandwidth in kernel density estimate (R)

I'm having some difficulties with R right now. What I have: a vector with minimal values for each triangular kernel a vector with maximal values a vector with the "middle" point (where the pick of each triangular should be) What I need: a density…
Amanda
  • 1
-1
votes
1 answer

Rewriting R's density() (not really)

In response to this question, I took upon the challenge to make my understanding on R's density() function. Since I'm pretty much very new to R, I have no ideas about vectors regarding the c() function, which made me use a list as the closest…
user14793609
-1
votes
1 answer

Interpolate density using a number of points instead of random sampling

When R calculates density(x) it uses n = 512 (I believe) so it randomly tries to pick 512 points and interpolates a density function using those points. I have a list of points (p) that I would like to use when computing density(x) INSTEAD of…
Denis
  • 11,796
  • 16
  • 88
  • 150
-1
votes
2 answers

Why AIC/BIC criteria estimations give very poor Gaussian mixture density fit to my data?

I have a data set (1D) link: dataset, which has values ranging from 21,000 to 8,000,000. When i plot histogram of the log values, i can see there are two peaks, roughly. I tried to fit Gaussian Mixture using sklearn package in Python. I tried to…
MWH
  • 353
  • 1
  • 3
  • 18
1 2 3
43
44