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
-1
votes
1 answer

What's wrong with this code, why can't it run

All other code ran but when I typed the below code, it couldn't run in pycharm Kde = np.sum(kernels,axis=0) Kde_fig = plt.plot(x_axes,kde,color='green') sns.rugplot(ds) plt.suptitle('KDE Plot') plt savefig('image3.png')
-1
votes
1 answer

Kernel smoothing function with cumulative distribution

I am trying to do a cumulative distribution. I know the matlab script to do it but I can't figure out how to do it in R Here is my matlab code : [p2,xp2,up2] = ksdensity(X(:,2),xi,'Kernel','epanechnikov','function','cdf','Support',[m(2),M(2)]); Any…
Yohann L.
  • 1,262
  • 13
  • 27
-1
votes
2 answers

Simulation with Kernel Density Estimate on R

I was trying to carry out a simulation based on the kernel distribution on R. Dataset used - CYG OB1 on the HSAUR2 package. Using the dataset I carried out an analysis to find the Kernel Density Estimate. I was looking to use this Kernel Density to…
Sunichie
  • 25
  • 4
-1
votes
1 answer

I have a kernel density map in R, but I would like values of 0 to be transparent. How do I change the colors so this is possible?

I have a point pattern (ppp) which I have done a kernel density estimation on. I have already changed the colour output using this: require(RColorBrewer) colfunc <- colorRampPalette(c("white", "black")) Then created the kernel density map (smktppp…
-1
votes
1 answer

Find the width and density for each class.

So I have to find the density and the width for each of the following class. I have the solution but i am confused on something. I am confused on if the answer is correct or incorrect because some sources are saying uppperLimit - lowerLimit = class…
user372204
  • 69
  • 2
  • 10
-1
votes
1 answer

What is the equation for multivariate kernel density estimation techniques?

I was reading about non-parametric kernel density estimation. http://en.wikipedia.org/wiki/Kernel_density_estimation For uni-variate where D = 1, we can write like For Multivariate Kernel density estimation (KDE), more preciously for d=3 and X =…
jquery404
  • 653
  • 1
  • 12
  • 26
-1
votes
1 answer

find unknown amount of density, cluster, groups of values (timestamps)

I currently have this: Data = [2003, 8, 4, 12, 30, 45, 2003, 8, 4, 12, 32, 55, ... 2003, 12, 9, 08, 30, 45] (The amount of datetime items is about 50.000 up to a million or sometimes more.) I would like to let my machine extract datetimes that…
-2
votes
1 answer

What is the difference between kde plot in seaborn and distplot in plotly? Also, are KDE plots reliable if the dataset is imbalanced?

I'm trying to figure out the difference between KDE plots in seaborn and distplot in plotly. While I understand that both try to estimate the underlying distribution of the data, I'm not sure how exactly. For instance, I tried plotting the kde plot…
swastika
  • 3
  • 3
-2
votes
1 answer

Is there a way to pipe density function to data frame using group_by on multiple columns? I need x and kde probability in the original data frame

I'd like to have KDE probability on a data frame grouped by multiple columns. Tried: d <- data %>% group_by(type,culture,set) %>% do(density(.$obs)) Error in .density(.$obs) : could not find function ".density"
-2
votes
1 answer

Why does the desnity plots exceed the unity value in the hist(x,freq="FALSE") command of R?

I am using hist(x_new,freq = FALSE) command to plot histogram, but the probability density exceed the value unity.
-6
votes
1 answer

hotspots map using kernel density estimation in R

I have x,y coordinates of car accidents within a city. I would like to create hotspots map using kernel density estimation in R. anyone can help with the code ?
1 2 3
43
44