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
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
8 votes
Accepted

R - Interpreting neural networks plot

As David states in the comments if you want to interpret a model you likely want to explore something besides neural nets. That said it you want to intuitively understand the network plot it is best ...
user avatar
  • 381
5 votes

Additive vs Multiplicative model in Time Series Data

I want to know which model between additive and multiplicative best suits the above data. It is hard to tell just by looking at it. A multiplicative decomposition roughly corresponds to an additive ...
user avatar
  • 378
4 votes
Accepted

Support vector regression and paremeters

It looks like that you are using scikit-learn. In this case use Grid Search Cross Validation or Randomized Search Cross Validation to find the best parameters. ...
user avatar
  • 1,466
4 votes
Accepted

Forecasting non-negative sparse time-series data

I have two ideas here, maybe they will be helpful. Idea 1: Model time between events You might think of your data as being generated by two processes: the first is a distribution over time intervals,...
user avatar
  • 558
4 votes

Additive vs Multiplicative model in Time Series Data

Calculate one day returns. Plot histogram of daily returns. Calculate $log(\frac{price_{i+1}}{price_i})$. Plot histogram of above logarithm. If second plot is more likely to be normally distributed ...
user avatar
3 votes

How can I predict student enrolment in September based on independent data available earlier in the year?

I would try out regression in Python's scikit-learn library to predict the September headcount given all those other variables you have. Here is a basic example using a linear model. Once you have ...
user avatar
  • 1,633
3 votes

Sequence forecasting in keras not possible for variable-length sequence forecasts

No, it is not possible with Vanilla LSTM. It's not a Kera problem, but the fundamental structure of Vanilla LSTM. I think you have a bit of misunderstanding of how LSTM works. You are assuming given ...
user avatar
  • 1,128
3 votes

Forecasting sales of next year using sales of past years?

If you have daily data you could create a dummy time calendar, i.e. you create a dummy variable for each day of the week and include your company's promotions for each product, Christmas, Easter, ...
user avatar
3 votes

How to use ML to forecast sales of a brand new product

You could use Bass or Gamma/Shifted Gompertz method to do that. You could use diffusion package in R. Here an example (it is ...
user avatar
3 votes

Neural Networks: How to prepare real world data to detect low probability events?

You bring up a number of good questions here Ans. I will do my best to cover each of them in turn. It isn't an exhaustive treatment but hopefully it helps... 1. How to normalize the categories. ...
user avatar
3 votes

Error analysis for better accuracy

NARMAX Methodology and Residual analysis both address this issue. Search for the following articles:(Error = Residual = Noise) Chaotic Time Series Prediction with residual Analysis Method Using ...
user avatar
3 votes
Accepted

What are some appropriate models to use for inventory forecast based on consumption history or trends?

The model you are looking for is called ARIMA, which are time series models where you can obtain trends, cycles, etc. The ARIMA models lets you model your univariate data by detecting monthly/annual ...
user avatar
3 votes
Accepted

How to calculate prediction error in a LSTM keras

You may use the technique explained in the article "Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning" Very briefely the technique consists of applying dropout for ...
user avatar
  • 338
3 votes
Accepted

Auto.arima with xreg in R, restriction on forecast periods

Using xreg suggests that you have external (exogenous) variables. In this, a regression model is fitted to the external variables with ARIMA errors. When ...
user avatar
  • 121
2 votes

Forecasting Foreign Exchange with Neural Network - Lag in Prediction

A couple of ways to improve your design: Consider a different normalization: The sigmoid function will attenuate large moves. It is likely precisely these large non-linear moves that attracted you ...
user avatar
2 votes
Accepted

Analyze performance Poisson regression model on a time series(count forecasting)

I'm not sure what you mean by "performance", but if what you mean is fit the answer is clear. You need to be using the log-likelihood to differentiate between different models. Basically, when you are ...
user avatar
  • 702
2 votes

How to use ML to forecast sales of a brand new product

I will try below steps: Find similar existing products: Clustering the brand new product with existing products. Interpolate the predicted sales for this brand new product: Since we already found a ...
user avatar
  • 578
2 votes

How to use ML to forecast sales of a brand new product

Without any additional data description, i would try out something along these lines: Cluster the shapes of the sales curves using methods for longitudinal data clustering (K-means for longitudinal ...
user avatar
  • 236
2 votes

Estimating panel model in R

For linear regression you want to use R's lm() function, like this: my.model <- lm(response.variable ~ predictor1 + predictor2, data = my.data) Look at the ...
user avatar
  • 401
2 votes

Forecasting non-negative sparse time-series data

In this type of data, information comes from 2 places Time interval between sales $T_i$: time interval between $Sale_{i-1}$ and $Sale_i$ Amount of $Sale_i$: $Y_i$ Similar to a previous answer, I ...
user avatar
  • 21
2 votes

Scaling thousands of automated forecasts in R

If you're working with R language, I would suggest first to try use R ecosystem's abilities to parallelize the processing, if possible. For example, take a look at packages, mentioned in this CRAN ...
user avatar
2 votes

LSTM Validation MSE always lower than Train MSE

One important thing to start with is to check that your targets are in [-1, 1] range because you have a 'tanh' as output function. You should also analyze the distribution of your targets (True class)....
user avatar
  • 306
2 votes
Accepted

How do I forecast sales data down to the individual item?

Do you want to forecast sales by day over a series of days? That would be more like ARIMA. Do you want to forecast "How many widgets will we sell in the next month"? That would be more like a ...
user avatar
  • 1,633
2 votes
Accepted

Choice of time series models

First thing first, when ever you use Time Series data you call it as Forecasting not Prediction as it is time dependent. To understand why you can go through this link Metrics to compare models When ...
user avatar
  • 2,352
2 votes
Accepted

How do I perform multi-step forecasting on LSTM trained with multiple observations of a sequence?

ConvLSTM, keras has an implementation, therefore you can go with Python itself. If you want multiple outputs from the LSTM, you can have look at return_sequences ...
user avatar
  • 626
2 votes
Accepted

Strategies for continuously assessing and improving model performance

I'm glad to see this question because this site gets such few questions on models that are actually in a production state. If I was in your position, I would start to think about how I'm going to ...
user avatar
2 votes

Is an Arma model equivalent to a 1-layer Recurrent Neural Network without activation function?

It's correct. The reason it sounds so weird is that a 1-layer-NN without activation function is simply a linear map, so it's equivalent to any linear model, the only difference being the inputs having ...
user avatar
2 votes

ValueError from statsmodels ExponentialSmoothing

The error is raised from lead - lag; in initial_values, these are set as y[m:2m] and ...
user avatar
  • 9,717

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