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 ...
AN6U5's user avatar
  • 6,798
29 votes
Accepted

Is a 100% model accuracy on out-of-sample data overfitting?

High validation scores like accuracy generally mean that you are not overfitting, however it should lead to caution and may indicate something went wrong. It could also mean that the problem is not ...
Jan van der Vegt's user avatar
23 votes
Accepted

What do "compile", "fit", and "predict" do in Keras sequential models?

Let's first see what we need to do when we want to train a model. First, we want to decide a model architecture, this is the number of hidden layers and activation functions, etc. (compile) Secondly,...
JahKnows's user avatar
  • 8,756
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 ...
Jan van der Vegt's user avatar
10 votes
Accepted

how to interpret predictions from model?

Alright so I rewrote some parts of your model such that it makes more sense for a classification problem. The first and most obvious reason your network was not working is due to the number of output ...
JahKnows's user avatar
  • 8,756
10 votes
Accepted

Is There a Way to Re-Calibrate Predicted Probabilities After Using Class Weights?

A more general adjustment for resampling (not just the simple undersampling in your linked paper) exists: Add $\ln\left(\frac{p_1(1-r_1)}{(1-p_1)r_1}\right)$ to the log-odds of each prediction, where ...
Ben Reiniger's user avatar
  • 11.1k
9 votes

Accuracy for Kmeans clustering

Accuracy is a measure of comparing the true label to the predicted label. K-Means is an unsupervised clustering algorithm where a predicted label does not exist. So, accuracy can not be directly ...
E. Kenney's user avatar
  • 304
8 votes

99% validation accuracy but 0% prediction results (UNET Architecture)

There is no "mismatch" of accuracy. Your problem is that you have an image segmentation problem where 99% of the pixels should be zero. So getting 99% accuracy is trivially easy. A model that predicts ...
Neil Slater's user avatar
  • 28.4k
8 votes

How to Predict the future values of time horizon with Keras?

This answer goes a little bit in a different direction, but I hope it still answers your question. It uses the idea of a rolling forecast/prediction. Because you use the word horizon, I will assume ...
n1k31t4's user avatar
  • 14.7k
7 votes

Calculate confidence score of a neural network prediction

One way to estimate the level of confidence we have about an ANN prediction is to use dropout perturbations. The idea was proposed in this paper: Dropout as a Bayesian Approximation. Representing ...
Leevo's user avatar
  • 6,025
7 votes

Why are predictions from my LSTM Neural Network lagging behind true values?

Welcome to the site. I think you were right that the prediction lags behind the true value because the series is autoregressive (i.e. a strong way to predict tomorrow’s value is “It will be about the ...
Nicholas James Bailey's user avatar
6 votes

Predicting with categorical data

Yep this is a common problem. What I would do is use SKLearns label encoder. With a similar API to SKLearn models, it can be fit to your category - meaning that any ...
jshep's user avatar
  • 393
6 votes
Accepted

Why can't my neural network learn how to predict the squares of natural numbers?

Decrease the number of hidden layers; you can omit the dense layer with $50$ neurons. Furthermore, train your network more. You should also provide more data. It is not much at the moment. Your ...
Green Falcon's user avatar
  • 13.9k
5 votes

Time series prediction using ARIMA vs LSTM

Adding to @AN6U5's respond. From a purely theoretical perspective, this paper has show RNN are universal approximators. I haven't read the paper in details, so I don't know if the proof can be applied ...
Louis T's user avatar
  • 1,148
4 votes

Encode multi-class response variable

It depends on the meaning of the classes, and whether they have any meaningful order. If they are ordinal or a scale, then there is a meaningful ordering, and it can potentially be reasonable to order ...
D.W.'s user avatar
  • 3,312
4 votes

Time series prediction using ARIMA vs LSTM

As an extreme case, I had a chance to study on Forex (Foreign Exchange Rate) forecast and intensively compared performances of LSTM, windowed-MLP and ARIMA. As many articles say, Forex time series is ...
East Chun's user avatar
4 votes

Time series prediction using ARIMA vs LSTM

I’ve come to the same conclusion as yourself and others, traditional forecasting is still probably the most applicable and maybe reliable for time series of numeric values. There is some slight bleed ...
Starbucks's user avatar
  • 175
4 votes

Time series prediction using ARIMA vs LSTM

ARIMA models are linear and LSTM models are nonlinear. Some other parametric nonlinear time series models that statisticians have studied are Threshold Autoregressive Models (TAR) and Smooth ...
Fortranner's user avatar
4 votes
Accepted

What does a predicted probability really mean, without considering the accuracy of the underlying model?

Accuracy is measured in classification model by comparing the predicted labels to the actual known labels. The predicted labels are a function of both the predicted probabilities for each class and a ...
yoav_aaa's user avatar
  • 993
4 votes
Accepted

Simple prediction with Keras

What you are trying to do here is forecast the future values of a time series. This is a predictive problem and the future values will depend on a number of latent factors. I will assume all we have ...
JahKnows's user avatar
  • 8,756
4 votes
Accepted

how to get prediction from trained random forest model?

Use the CountVectorizer you have fitted to preprocess your custom input then feed it to your model for prediction. ...
Simon Larsson's user avatar
4 votes

what is the interest of TimeDistributed after an LSTM layer?

Ok let's say you have an LSTM() layer with return_sequences = True set. That means each LSTM cell in it is outputting its value. ...
Leevo's user avatar
  • 6,025
4 votes

What is the minimum amount of data required for sales prediction with ML

As @Ethan said there is no general answer to this question. There are multiple perspectives that you need to take into consideration. Amount of the data: The general tendency is more data will lead ...
MachineLearner's user avatar
4 votes

Why do decision trees have low accuracy?

It's not true in general. Decision trees tends to overfit in comparison to other algorithms, which provide too low accuracy. But if you use a decision tree in the right way i.e you prepare data in the ...
fuwiak's user avatar
  • 1,365
4 votes

Are Machine Learning Weather Prediction models better than classic weather forecast?

I'm not a meteorologist but in my humble opinion, Numerical Weather Prediction and especially WRF (stands for Weather Research and Forecasting - a high resolution & mesoscale model, unlike the old ...
UgurZCifci's user avatar
3 votes

Batching in Recurrent Neural Networks (RNNs) when there is only a single instance per time step?

Your edit is not right. from the keras documentation you can actually understand the difference between timesteps and batches. I take your examples: For the first example. You have 4 instances, or ...
erre4's user avatar
  • 95
3 votes
Accepted

Using machine learning technique to predict commodity prices

Based on your question there are couple of things which I would assume to answer your question: As you need to predict the commodity price the data which is collected is time series data. Since you ...
Toros91's user avatar
  • 2,362
3 votes

Is it possible to use the saved xgboost model (with one-hot encoding features) on unseen data (without one-hot encoding) for prediction?

A model is built on a specific set of features, which may include categorical features encoded using one-hot encoding. If you have new data with additional categories, your model has no idea how to ...
tom's user avatar
  • 2,238
3 votes
Accepted

Very low probability in naive Bayes classifier

I can't tell you for sure without you describing your calculation more or showing code, but my guess is you're not actually calculating the posterior probability here. I bet this is just the ...
David Marx's user avatar
  • 3,188
3 votes

k-means: Only one-dimensional cluster predictions in two-dimensional space

KMeans does correctly do what it is supposed to do. Just plot your data correctly, with the same scale on both axes... Y deviations do not matter, they are tiny compared to the X axis. Deviations ...
Has QUIT--Anony-Mousse's user avatar

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