57 votes
Accepted

Machine learning - features engineering from date/time data

I would start by graphing the time variable vs other variables and looking for trends. For example In this case there is a periodic weekly trend and a long term upwards trend. So you would want ...
user avatar
  • 686
56 votes

Adding Features To Time Series Model LSTM

For RNNs (e.g., LSTMs and GRUs), the layer input is a list of timesteps, and each timestep is a feature tensor. That means that you could have a input tensor like this (in Pythonic notation): ...
user avatar
42 votes
Accepted

Time Series prediction using LSTMs: Importance of making time series stationary

In general time series are not really different from other machine learning problems - you want your test set to 'look like' your training set, because you want the model you learned on your training ...
user avatar
  • 2,118
31 votes

Time series prediction using ARIMA vs LSTM

Statement 1 is correct, statement 2 is correct, but requires elaboration, and statement 3 is incorrect for seasonal ARIMA: The following might point you in the right direction but hopefully you'll ...
user avatar
  • 6,678
28 votes
Accepted

Convert a pandas column of int to timestamp datatype

You can specify the unit of a pandas.to_datetime call. Stolen from here: ...
user avatar
  • 1,057
23 votes
Accepted

Looking for a good package for anomaly detection in time series

I know I'm bit late here, but yes there is a package for anomaly detection along with outlier combination-frameworks. The package is in Python and its name is pyod. It is published in JMLR. It has ...
user avatar
20 votes

How to deal with time series which change in seasonality or other patterns?

After reading your question, I became curious about the topic of time series clustering and dynamic time warping (DTW). So, I have performed a limited search and came up with basic understanding (for ...
user avatar
18 votes
Accepted

Can Reinforcement learning be applied for time series forecasting?

Yes, but in general it is not a good tool for the task, unless there is significant feedback between predictions and ongoing behaviour of the system. To construct a reinforcement learning (RL) ...
user avatar
  • 27.4k
17 votes

How can I predict traffic based on previous time series data?

The problem with models like KNN is that they do not take into account seasonality (time-dependent variations in trend). To take those into account, you should use Time Series analysis. For count ...
user avatar
15 votes
Accepted

How to remove outliers using box-plot?

Seaborn uses inter-quartile range to detect the outliers. What you need to do is to reproduce the same function in the column you want to drop the outliers. It's quite easy to do in Pandas. If we ...
user avatar
  • 3,740
14 votes
Accepted

How can autoencoders be used for clustering?

Clustering is difficult to do in high dimensions because the distance between most pairs of points is similar. Using an autoencoder lets you re-represent high dimensional points in a lower-...
user avatar
  • 2,118
13 votes
Accepted

How to train model to predict events 30 minutes prior, from multi-dimensionnal timeseries

This is a fun problem. This is a time series and from this time series you want to identify the trigger of a certain event. So it is a binary classification problem. Based on the information from the ...
user avatar
  • 8,518
13 votes
Accepted

Dynamic Time Warping is outdated?

I wouldn't consider DTW to be outdated at all. In 2006 Xi et al. showed that [...] many algorithms have been proposed for the problem of time series classification. However, it is clear that one-...
user avatar
  • 404
13 votes

What is the best method for classification of time series data? Should I use LSTM or a different method?

I would not use the word "best" but LSTM-RNN are very powerful when dealing with timeseries, simply because they can store information about previous values and exploit the time dependencies ...
user avatar
  • 3,740
12 votes

DTW (Dynamic Time Warping) requires prior normalization?

I am glad you asked ;-) In 99% of cases, you must z-normalize. Want to know why? I wrote a tutorial on this, page 46 http://www.cs.unm.edu/~mueen/DTW.pdf
user avatar
  • 121
12 votes
Accepted

Multiple time-series predictions with Random Forests (in Python)

Random forest (as well as most of supervised learning models) accepts a vector $x=(x_1,...x_k)$ for each observation and tries to correctly predict output $y$. So you need to convert your training ...
user avatar
  • 1,511
12 votes
Accepted

Prediction interval around LSTM time series forecast

Directly, this is not possible. However, if you model it in a different way you can get out confidence intervals. You could instead of a normal regression approach it as estimating a continuous ...
user avatar
11 votes
Accepted

Keras LSTM with 1D time series

LSTM layers require data of a different shape. From your description, I understand the starting dataset to have 3125 rows and 1000 columns, where each row is one time-step. The target variable should ...
user avatar
  • 14k
10 votes

How can I predict traffic based on previous time series data?

I think Christopher's answers above are entirely sensible. As an alternate approach (or perhaps just in addition to the advise he's given), I might start by just visualizing the data a bit to try get ...
user avatar
10 votes

Python library to implement Hidden Markov Models

For another alternative approach, you can take a look at the PyMC library. There is a good gist created by Fonnesbeck which walks you through the HMM creation. And if you become really eager about the ...
user avatar
10 votes
Accepted

RNN using multiple time series

Multivariate time series is an active research topic you will find a lot of recent paper tackling the subject. To answer your questions, you can use a single RNN. You can input one value for each ...
user avatar
  • 116
9 votes

Machine learning - features engineering from date/time data

One more thing to consider, beyond everything that Ben Haley said, is to convert to user local time. For example, if you are trying to predict something that occurs around 8pm for all users, if you ...
user avatar
  • 241
9 votes
Accepted

How to merge monthly, daily and weekly data?

when given two time series with different time steps, what is better: Using the Lowest or the biggest time step ? For your timeseries analysis you should do both: get to the highest granularity ...
user avatar
  • 381
9 votes

Adding Features To Time Series Model LSTM

Based on all the good answers of this thread, I wrote a library to condition on auxiliary inputs. It abstracts all the complexity and has been designed to be as user-friendly as possible: https://...
user avatar
9 votes

Binary classification of every time series step based on past and future values

You are facing a very common problem: handling imbalanced data. For neural networks, typical procedures are: Having the proper metrics: global accuracy should not be used. Oversampling the minority ...
user avatar
  • 1,598
9 votes

How to remove outliers using box-plot?

If you need to remove outliers and you need it to work with grouped data, without extra complications, just add showfliers argument as False in the function call. ...
user avatar
  • 243
8 votes

Machine learning - features engineering from date/time data

Divide the data into windows and find features for those windows like autocorrelation coefficients, wavelets, etc. and use those features for learning. For example, if you have temperature and ...
user avatar
8 votes
Accepted

Recommendations for storing time series data

There are two solutions that are worth looking at: InfluxDB is an open source database platform specifically designed for time series data. The platform includes many optimized functions related to ...
user avatar
8 votes

Python library to implement Hidden Markov Models

As an update on this question, I believe the accepted answer is not the best as of 2017. As suggested in comments by Kyle, hmmlearn is currently the library to go ...
user avatar
  • 436
8 votes

Classify multivariate time series

If you're in Python, there are a couple of packages that can automatically extract hundreds or thousands of features from your timeseries, correlate them with your labels, choose the most significant, ...
user avatar
  • 203

Only top scored, non community-wiki answers of a minimum length are eligible