Memuat
Memuat
Watch every step above performed live, with English narration.
1 plays
Class book
Page 1 / 7
Cover: ANFIS Metaheuristics Time Series Forecasting Class #1: Non-Linear Time Series: Dataset, Stationarity, and Patterns
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 Metaheuristics Time Series Forecasting #1: Non-Linear Time Series: Dataset, Stationarity, and Patterns”.
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, two non-linear time series. The Meki Glass which is chaotic but has a beautiful attractor in the phase map, and the sunspot 300 years with its 11-year cycle. Both of them we prepare as input and target pairs for Anvis. Let's start. Hello, welcome to the tutorial series, metaheuristic model prediction Anvis for non-linear time series forecasting. Many time series in the real world, such as electrical load, rainfall, and prices, are non-linear, making them difficult to predict with linear models. In this 6-part series, we build everything from scratch. Time series analysis, Sugeno phase, Anvis, optimization with PSO and genetic algorithms, comparison with LSTM and ARIMA, up to the Diebold-Mariano test. We open the terminal through the terminal menu,
new terminal, then install nampai, pandas, stats models, torque, and metplotlib. Stats models for stationarity testing and ARIMA,
torque for LSTM comparison.
Create a file named data_underscore_time_dot_py. The Mackey Glass function integrates a delayed differential equation. Changes in X depend on the value of X 17 time units ago. With tau 17, this series is chaotic, never repeating exactly but still structured, and serves as the classic benchmark for Anvis since the 1993 paper. The Sunspot function reads annual sunspot data from CSV. The embedding function arranges inputs from several past values and the target from future values. The normalization function scales data to the 0 to 1 scale
using only the minimum and maximum of the training data, to prevent leakage from the test data. The case dictionary stores the configuration. Mackey Glass uses lag 18, 12, 6, and 0 to forecast 6 steps ahead. Exactly like the classic study, Sunspot uses lag 9, 2, 1, and 0 to forecast 1 year ahead, with regularization that we will discuss later. The prepare function returns ready-to-use training and test data.
Create the exploration underscore time series file.py and run it. Mackey Glass contains 1,500 points and passes the ADF test with P0, meaning it is stationary, and its autocorrelation peaks again at lag 49. Sunspot contains 309 years, with PADF 0.053 at the boundary, and autocorrelation peaks at lag 10, which corresponds to the solar cycle of about 11 years. Mackey Glass produces 476 training pairs and 600 test pairs, while Sunspot has 210 training pairs and 89 test pairs.
Let's look at the graph. The Mackey Glass series looks like a chaotic wave, but the phase plot of X against X 17 steps before forms a neat chaotic attractor, evidence of a deterministic non-linear pattern. Sunspot shows an up-and-down cycle with different peaks, and its autocorrelation oscillates with a period of about 11 years. Non-linear patterns like these will be captured by Anfis.
Done. We have already generated the Mackey Glass series, loaded the Sunspot data, tested for stationarity, analyzed the autocorrelation and phase plot, and prepared the lag embedding. In the next episode, we will study the Sugeno fuzzy inference system, the foundation of Anfis. 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 Sugeno fuzzy system and Anfis, parameter optimization with PSO and genetic algorithms, up to LSTM and ARIMA comparisons and Diebold Mariano tests, as well as opening Python programming courses for engineers. Want to master the entire series, from chaotic time series to statistical evaluation? All 6 episodes, complete with step-by-step PDF guides, dataset, and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or one-time pay Rp999.000 for lifetime access. Want a single 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. Thank you for watching! Thank you for watching!
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 →