Questions tagged [time-series]

A Time series is a sequence of data points with values measured at successive times (either in continuous time or at discrete time periods). Time series analysis exploits this natural temporal ordering to extract meaning and trends from the underlying data.

Time series data is data with a pattern (“trend”) over time. Quantitative forecasting can be applied when two conditions are satisfied:

  1. numerical information about the past is available;
  2. it is reasonable to assume that some aspects of the past patterns will continue into the future.

Time series data are useful when you are forecasting something that is changing over time (e.g., stock prices, sales figures, profits, etc.). Examples of time series data include:

  • Daily IBM stock prices
  • Monthly rainfall
  • Quarterly sales results for Amazon
  • Annual Google profits

https://www.otexts.org/fpp/1/4

Time series models attempt to make use of the natural one-way ordering of time so that values for a given period will be expressed as a function of past values. This same idea is used in time series forecasting — future values based on past data.

Typically, time series data points are spaced at uniform time intervals.

A time series model will generally reflect the fact that observations close together in time will be more closely related than observations further apart.

As a place to start, take a look at Wikipedia's page on time series. For further reading, refer to the Statsoft website which has an online textbook on time series analysis.

For time series analysis in , consider looking at the Time Series Task View and questions tagged for the zoo package and for the xts package.


Tag usage:

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis or Data Science, the StackExchange site for Data Science related topics like time series.

15192 questions
15
votes
2 answers

Sliding time intervals for time series data in R

I am trying to extract interesting statistics for an irregular time series data set, but coming up short on finding the right tools for the job. The tools for manipulating regularly sampled time series or index-based series of any time are pretty…
Iterator
  • 20,250
  • 12
  • 75
  • 111
14
votes
2 answers

DateFormatter is bringing 1970 as year not the original year in the dataset

I am trying to plot time series data. But x axis ticks are not coming the way it should. I wanted to out mont and year as x axis ticks. here is my code from matplotlib.dates import DateFormatter import matplotlib.dates as mdates fig,ax =…
Rashida
  • 401
  • 7
  • 18
14
votes
4 answers

PCA with several time series as features of one instance with sklearn

I want to apply PCA on a data set where I have 20 time series as features for one instance. I have some 1000 instances of this kind and I am looking for a way to reduce dimensionality. For every instance I have a pandas Data Frame, like: import…
Mina L.
  • 163
  • 1
  • 6
14
votes
2 answers

How to read edf data in Python 3

How can I read edf data using Python? I want to analyze data of a edf file, but I cannot read it using pyEDFlib. It threw the error OSError: The file is discontinous and cannot be read and I'm not sure why.
Mindy
  • 175
  • 1
  • 1
  • 8
14
votes
3 answers

Keras LSTM: a time-series multi-step multi-features forecasting - poor results

I have a time series dataset containing data from a whole year (date is the index). The data was measured every 15 min (during whole year) which results in 96 timesteps a day. The data is already normalized. The variables are correlated. All the…
14
votes
4 answers

Interpolate missing values in a time series with a seasonal cycle

I have a time series for which I want to intelligently interpolate the missing values. The value at a particular time is influenced by a multi-day trend, as well as its position in the daily cycle. Here is an example in which the tenth observation…
J. Win.
  • 6,662
  • 7
  • 34
  • 52
14
votes
4 answers

Keras LSTM predicted timeseries squashed and shifted

I'm trying to get some hands on experience with Keras during the holidays, and I thought I'd start out with the textbook example of timeseries prediction on stock data. So what I'm trying to do is given the last 48 hours worth of average price…
cdecker
  • 4,515
  • 8
  • 46
  • 75
14
votes
4 answers

TSFRESH library for python is taking way too long to process

I came across the TSfresh library as a way to featurize time series data. The documentation is great, and it seems like the perfect fit for the project I am working on. I wanted to implement the following code that was shared in the quick start…
Michael Bawol
  • 373
  • 2
  • 11
14
votes
4 answers

linear interpolate missing values in time series

I would like to add all missing dates between min and max date in a data.frame and linear interpolate all missing values, like df <- data.frame(date = as.Date(c("2015-10-05","2015-10-08","2015-10-09", …
ckluss
  • 1,477
  • 4
  • 21
  • 33
14
votes
3 answers

Split Python sequence (time series/array) into subsequences with overlap

I need to extract all subsequences of a time series/array of a given window. For example: >>> ts = pd.Series([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> window = 3 >>> subsequences(ts, window) array([[0, 1, 2], [1, 2, 3], [2, 3, 4], [3,…
Marc Garcia
  • 3,287
  • 2
  • 28
  • 37
14
votes
4 answers

How to make gradient color filled timeseries plot in R

How to fill area under and above (sp)line with gradient color? This example has been drawn in Inkscape - BUT I NEED vertical gradient - NOT horizontal. Interval from zero to positive == from white to red. Interval from zero to negative == from…
Ladislav Naďo
  • 822
  • 12
  • 27
14
votes
1 answer

R time-series forecasting with auto.arima and xreg=explanatory variables

I have lots of time-series (retail data) and I want to make forecast for all of them. For example let's take a look at one of them: x <- c(1774, 1706, 1288, 1276, 2350, 1821, 1712, 1654, 1680, 1451, 1275, 2140, 1747, 1749, 1770, 1797, 1485,…
Marta
  • 3,493
  • 6
  • 28
  • 43
14
votes
1 answer

createTimeSlices function in CARET package in R

I am working with multivariate financial time series data and having problems using the createTimeSlices function. I cannot find any use of the function except the one used by Max Kuhn. Can anybody help me in understanding the usage of the function?
Panchacookie
  • 427
  • 1
  • 6
  • 22
14
votes
2 answers

R - Transform Data frame to Time Series

I have a Google stock data. It has two columns Date(Daily Data) and Close i.e. Google closing index. Date Close 10/11/2013 871.99 10/10/2013 868.24 10/9/2013 855.86 10/8/2013 853.67 10/7/2013 865.74 10/4/2013 872.35 10/3/2013 …
Ajay
  • 783
  • 3
  • 16
  • 37
14
votes
2 answers

Storing Time Series in AWS DynamoDb

I would like to store 1M+ different time series in Amazon's DynamoDb database. Each time series will have about 50K data points. A data point is comprised of a timestamp and a value. The application will add new data points to time series frequently…
jQguru
  • 257
  • 2
  • 5
  • 10