Smoothing algorithm for times series and slope measurement

Click For Summary
SUMMARY

The discussion focuses on the application of smoothing algorithms, specifically splines and LOESS, for analyzing time series data collected at one-second intervals. The user, Nick, seeks methods to both smooth the data while preserving overall trends and to measure the slope of the smoothed line. It is concluded that while splines may overfit the data, LOESS can effectively connect data points and accommodate long-term trends by adjusting the smoothing parameter. The importance of understanding the purpose of the smoothed values is emphasized for effective modeling.

PREREQUISITES
  • Understanding of time series data analysis
  • Familiarity with smoothing algorithms such as LOESS and splines
  • Knowledge of polynomial modeling and Minimum Description Length principles
  • Basic skills in data visualization techniques
NEXT STEPS
  • Research the implementation of LOESS smoothing in Python using libraries like statsmodels
  • Explore spline fitting techniques and their applications in R with the splines package
  • Study the Minimum Description Length principle in the context of polynomial regression
  • Learn about measuring slope and curvature in smoothed time series data
USEFUL FOR

Data scientists, statisticians, and researchers involved in time series analysis and visualization, particularly those interested in smoothing techniques and trend measurement.

nickmath
Messages
1
Reaction score
0
Hi,

I'm doing an experiment that gathers one data point approximately each second. I have plotted all the datapoints on a graph. The graph has many tops and bottoms. Now due to the fact that there are so many data points and that I can visualle tell that there are several overal trends: one period my data is going up, the next period it is level again for a period of time and the next period it can be down again. And in each of these periods the data can go up, down or level again, although the overal direction is up, down or level. I have searched for different smoothing methods that can follow all these small movements, but at the same time (using a second smoothing algorithm/parameter) can follow the overal movement. I was thinking about using splines or lowess. Are splines or lowess able to do this?

Second problem I'm having is, after having applied a smoothing algorithm, I need to be able to measure the slope of the smoothing line. I need to know what the slope/curvature of that smoothing line is at any giving moment in time. All the pointers you can give me are really welcome. Thanks.

Kind regards,

Nick
 
Physics news on Phys.org
Foremost: I am an undergraduate CS student and therefore my advise should be taken with a skeptical ear.

I think it depends on what you want to use the smoothed values for.
If you want to do some sort of predictions or make a general model of the data I think what you want to do is model the data with Minimum Description Length using the order of a polynomial and a polynomial that fits the data. Doing a spline will probably overfit your data if this is what you want to smooth for.

If you want to make a nicer visualization of the data, spline might do the trick for you. I'm not really sure though - I'm hesitant to agree that it would do a very good job.
 
Are you sure that all of these little ups and downs are meaningful data? I guess LOESS would be as good as any method for connecting the dots. If you are interested in long-term trends, you could just fit another LOESS model, with a larger smoothing parameter.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K