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
3
votes
3 answers

Fill missing values in time-series with duplicate values from the same time-series in python

I've got a timeseries of intermitent daily data like this. import pandas as pd import numpy as np df = pd.DataFrame({'Date': ['2020-01-01', '2020-01-02',…
storeguy
  • 31
  • 5
3
votes
1 answer

Resample data according to a timeArray - JAVA

I'd like to translate the following Matlab function ts = resample(ts,Time) resamples the timeseries object ts using the new Time vector. in java. For the moment, I could not find any similar java libraries performing this feature of matlab. My "ts"…
Souf
  • 31
  • 2
3
votes
2 answers

How do I fit the model of two concatenate LSTM in keras?

Hi I'm new in keras and I concatenate two LSTM in keras. The dataset is a univariate time series which was split by the method sliding window. Then I reshaped it as a tesor of [samples, features,time steps]. However when I tried to fit the model the…
Andres
  • 43
  • 5
3
votes
1 answer

Assessing synchrony between time series

I would like to assess the synchrony between two time series (i.e. do they have the same evolution over time?). I am using Python. Here are examples of the time series that I have: The first plot shows time series that have quite similar evolution…
Falco
  • 183
  • 2
  • 16
3
votes
3 answers

How to filter rows based on time (hh:mm:ss) using dplyr in tidyversse in R?

This is my data library(tidyverse) a<-tribble( ~"Date", ~"Time", ~"Name", ~"Value", "2020-06-03", "00:15:00", "DR.RADHAKRISHNAN SALAI", 0.166, "2020-06-03", "00:30:00", "DR.RADHAKRISHNAN SALAI", 0.867, "2020-06-03", …
Betel
  • 151
  • 7
3
votes
1 answer

Error in due loop of ufunc does not support argument 0 of type str which has no callable log method

When I use the below log function, i am getting the following error message in my jupyter notebook. data1 = np.log(mdata).diff().dropna() I tried to do cast but unable to get rid of this…
Karthika
  • 109
  • 2
  • 3
  • 6
3
votes
1 answer

EWM in pandas for timeseries transformation

I am trying to do a time series prediction with ARIMA. So, as the first step, I am doing some series transformation #Taking log transform dflog=np.log(df) #Taking exponential weighted mean`enter code here` df_expwighted_mean =…
Johnson Francis
  • 249
  • 3
  • 17
3
votes
1 answer

Time Series and MA-model look equal in R

I am using the forecast package of R and I created a MA(1) model by using the ARIMA function. I plotted the time series itself ($x variable of the ma_model), the model itself ($fitted variable of the ma_model) and the residuals (residuals variable…
PeterBe
  • 700
  • 1
  • 17
  • 37
3
votes
1 answer

Augmenting Time Series Data for Deep Learning

If I want to apply deep learning to the dataset from the sensors that I currently possess, I would require quite a lot data, or we may see overfitting. Unfortunately, the sensors have only been active for a month and therefore the data requires…
SDG
  • 2,260
  • 8
  • 35
  • 77
3
votes
2 answers

Aggregate time series data, get average without NA or 0s in R

I am trying to aggregate my time series data, and I want to get the average value of the aggregated value without including NAs or 0s. Here is what my data looks like. V1 423 470 473 626 1: 2018-01-01 00:00:00 0.00000 …
Yun Hyunsoo
  • 71
  • 1
  • 8
3
votes
1 answer

How can I add exogenous variables to my ARIMA model estimation while using fable package with model() extension

I am trying to estimate ARIMA models for 100 different series. So I employed fabletools::model() method and fable::ARIMA() function to do that job. But I couldn't able to use my exogenous variables in model estimation. My series has 3 different…
omzeybek
  • 305
  • 2
  • 14
3
votes
0 answers

How to use Bahdanau attention for timeseries prediction?

Can we use Bahdanau attention for multivariate time-series prediction problem? Using the Bahdanau implementation from here, I have come up with following code for time series prediction. from tensorflow.keras.layers import Input, LSTM,…
Ather Cheema
  • 416
  • 2
  • 14
3
votes
1 answer

Matplotlib Heat-Map Label

Hello and thank you for your help! (Code and Data Provided Below) (Image of the plot below) I am trying to add a legend to this heatmap that explains the variance in color on the map (the warmer colors mean a higher temp). I am…
Xavier Conzet
  • 490
  • 1
  • 5
  • 14
3
votes
1 answer

Python/Pandas group close events together based on a window

I would like to group events that happened close together into a parent event. An example is this: import pandas as pd df = pd.DataFrame( [ ['2020-01-01 10:00', '1'], ['2020-01-01 10:01', '2'], ['2020-01-01 10:02',…
andrewm4894
  • 1,451
  • 4
  • 17
  • 37
3
votes
1 answer

Activate pointClickCallback in a time series to capture peaks and valleys

I am trying to select manually the peaks and valleys from a noisy sinusoidal signal within a time series which is displayed on a dygraph using R. I create a simple example below. x=seq(0.1,10,by=0.01) y=sin(x) ts =…