Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 6
Cover: Metaheuristic ANFIS Time Series Forecasting Class #5: Comparison with LSTM and ARIMA
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class ANFIS Metaheuristic Time Series Forecasting #5: Comparison with LSTM and ARIMA”.
Other ways we can help with Python.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

Multi-Objective Optimization Course: NSGA-II, MOPSO & Hybrid Algorithms (Python)

ECG Arrhythmia Classification Course with Wavelet & Deep Learning (PyTorch)

ANFIS + PSO/GA Course for Non-Linear Time Series Forecasting (Python)
Have it built for you
No time to learn Python? Our team can do the project for you.

Python Machine Learning — Prediction Models, Customer Segmentation, Fraud Detection & AI Apps

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, Anfis Meta Heuristics is compared with Arima and LSTM. On the Mickey Glass Chaos Series, Anfis is 12 times more accurate than LSTM. However, on the short sunspot series, the simplest Arima actually wins. Let's start. Hello, welcome to episode five of the Anfis Meta Heuristics series for time series forecasting. A new model only makes sense when compared with a strong benchmark. We use two of the most common in journals, Arima from Classical Statistics and LSTM from Deep Learning, on the exact same test data.
Create a benchmark .pi file. The Arima forecasting function trains Arima on the training data, order 4, 0, 2 for Mickey Glass and R9 for sunspot according to its cycle. Then, with fixed parameters, the model is run across the entire series, and from each origin point in the test data, we request dynamic forward forecasts, so that it is comparable with Anfis.
The LSTM forecasting class has one LSTM layer with 32 units and a linear layer. The LSTM forecasting function orders the input lags from the oldest as a sequence, trains 400 epochs with Adam, and saves the weights with the best RMSI validation, using early stopping technique to avoid overfitting. The main part loads the premise parameters from the previous episode and selects PSO or GE based on RMSI validation, not the test data.
Then all three models forecast the test data, RMSI is printed, and all forecasts are saved to the NPZ file. Run On Mickey Glass, Anfis PSO achieves RMSI 0,0029, LSTM 0,0339, and Arima 0,0485. Anfis is 12 times more accurate than LSTM and 17 times more accurate than Arima. On Sunspot, Arima 0,1128, Anfis Ga 0,1303, and LSTM 0,1335. Continue with the forecast graph.
Let's see the graph. On Mickey Glass, the Anfis line sticks closely to the actual data, LSTM slightly deviates at the peaks, and Arima lags behind on sharp changes because it cannot capture non-linear dynamics. On Sunspot, all three are similar and all struggle at the highest peak. The lesson is that non-linear models excel when the data is rich and the non-linear pattern is strong, but on short data, simple models with few parameters can be more robust.
Done. We have fairly compared the metaheuristic Anfis with Arima and LSTM. But does the slight difference in Sunspot mean anything? In the last episode, we answer with comprehensive metrics and the Daibold Mariano test. Currently working on a thesis, dissertation, or research in the field of forecasting and artificial intelligence? Cerdas Inovasi Digital helps implement forecasting models. From the Fazi Sugeno and Anfis systems, parameter optimization with PSO and genetic algorithms, up to comparisons with LSTM and Arima as well as the Daibold Mariano test, and opening Python programming courses for engineering. Want to master the entire series, from chaotic time series to statistical evaluation? All six episodes, complete with step-by-step PDF guides, datasets, and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want just one class? Buy the single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact our WhatsApp, or visit cerdasinovasidigital.com Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →