Questions tagged [smoothing]

Smoothing related to statistical programing solutions in which a signal is filtered to create an approximating function that attempts to capture important patterns in the data, while leaving out noise, or for visual clarity to see general trends.

In scientific software for statistical computing and graphics, function smooth.spline implements a smoothing spline; function ksmooth implements a kernel estimator; function loess implements LOESS.

1479 questions
13
votes
4 answers

loess predict with new x values

I am attempting to understand how the predict.loess function is able to compute new predicted values (y_hat) at points x that do not exist in the original data. For example (this is a simple example and I realize loess is obviously not needed for…
Alex
  • 19,533
  • 37
  • 126
  • 195
12
votes
1 answer

ggplot2: Transparent legend background when stat_smooth is used

I have two plots. One with smoothed lines: library(splines) library(ggplot2) ggplot(mtcars, aes(hp, qsec)) + stat_smooth(aes(group = cyl, colour = factor(cyl)), method = "glm", formula = y ~ ns(x, 1), level = 1e-9, …
skeletor
  • 361
  • 1
  • 3
  • 8
12
votes
3 answers

gaussian sum filter for irregular spaced points

I have a set of points (x,y) as two vectors x,y for example: from pylab import * x = sorted(random(30)) y = random(30) plot(x,y, 'o-') Now I would like to smooth this data with a Gaussian and evaluate it only at certain (regularly spaced) points…
Magellan88
  • 2,543
  • 3
  • 24
  • 36
11
votes
1 answer

How do i smooth the curves(contours) in OpenCV?

I am working on a black&white image just like the first one from the link : http://imageshack.us/g/33/firstwm.png/ It has a lot of "noise" so I applied a Median filter over it to smooth it, thus getting the second picture. cvSmooth(TempImage,…
Adrian
  • 2,028
  • 2
  • 17
  • 28
11
votes
1 answer

How to identify the function used by geom_smooth()

I would like to display a plot created by geom_smooth() but it is important for me to be able to describe how the plot was created. I can see from the documentation when n >= 1000, gam is used as the smoothing function, but I cannot see how many…
A Toll
  • 647
  • 7
  • 15
11
votes
4 answers

How to smooth mesh triangles in STL loaded BufferGeometry

I´m trying to load some STL files using Three.js. The models are loaded correctly, but there are too many triangles that I would like to merge/smooth. I had successfully applied smooth loading terrains in other 3D formats, but I can´t do it with…
spacorum
  • 495
  • 6
  • 16
11
votes
3 answers

Making a SVG path like a smooth line instead of being ragged

Well in my project I create river lines from pathes. And due to my kind of big stroke-width it is very ragged: I already searched around. But the only thing I found was stroke-linejoin: round;. As you can see here: it is way better but I'm still…
kwoxer
  • 3,734
  • 4
  • 40
  • 70
11
votes
1 answer

how to smooth a curve in python

I have an entropy curve (1d numpy array) but this curve has a lot of noise. I would like to delete the noise with a smoothing. This is the plot of my curve: I have tried to solve this issue making a convolution product with a Kaiser-Bessel…
elviuz
  • 639
  • 1
  • 7
  • 26
11
votes
3 answers

how do I select the smoothing parameter for smooth.spline()?

I know that the smoothing parameter(lambda) is quite important for fitting a smoothing spline, but I did not see any post here regarding how to select a reasonable lambda (spar=?), I was told that spar normally ranges from 0 to 1. Could anyone share…
user001
  • 185
  • 1
  • 1
  • 9
11
votes
1 answer

how to make DispatcherTimer events smoother in WPF?

In my WPF application, the user presses a button to start a 3D model rotating smoothly, and lets up on the button to stop the rotation. To do this, I create a DispatcherTimer: DispatcherTimer timer = new DispatcherTimer(); timer.Tick += new…
M Katz
  • 5,098
  • 3
  • 44
  • 66
10
votes
1 answer

Lowess Smoothing of Time Series data python

I am trying to use LOWESS to smooth the following data: I would like to obtain a smooth line that filters out the spikes in the data. My code is as follows: import pandas as pd import matplotlib.pyplot as plt from matplotlib.dates import…
James
  • 113
  • 1
  • 5
10
votes
2 answers

Where to find Python implementation of Chaikin's corner cutting algorithm?

I am looking for Chaikin's corner cutting algorithm (link1, link2) implemented in Python 2.7.X but can't find it. Maybe someone have it and able share the code?
Comrade Che
  • 619
  • 8
  • 25
10
votes
3 answers

scipy BSpline fitting in python

This is my first time using BSpline, and I want to fit a curve to my data points. I've tried using Univariate Spline and attempted to use splev and splrep but I'd really like to learn how to do this using BSpline. It looks like my fitting is really…
Sophia Medallon
  • 103
  • 1
  • 1
  • 4
10
votes
1 answer

Smooth 2D surface

I am wondering about the possibility to smooth the plot or make it somehow better, since now the pixels are too big. library(ggplot2) library(reshape2) # plot2d = melt(c) plot2d = melt(matrix(rnorm(20), 5)) # fake data names(plot2d)…
Aleksandr Ianevski
  • 1,894
  • 1
  • 18
  • 22
9
votes
1 answer

Scroll ListView smoothly and programmatically

I have searched a lot but I couldn't find an answer. I want to implement something like in Go Launcher. When you drag an icon in app drawer and move it out of container top or bottom bound, the list begins to scroll. So far, I have tried following…
glodos
  • 1,203
  • 3
  • 13
  • 21