Use this file to discover all available pages before exploring further.
Predictive maintenance (PdM) is a data-driven preventive maintanance
program. It is a proactive maintenance strategy that uses sensors to
monitor the performance and equipment conditions during operation. The
PdM methods constantly analyze the data to predict when optimal
maintenance schedules. It can reduce maintenance costs and prevent
catastrophic equipment failure when used correctly.In this notebook, we will apply NeuralForecast to perform a supervised
Remaining Useful Life (RUL) estimation on the classic PHM2008 aircraft
degradation dataset.Outline 1. Installing Packages 2. Load PHM2008 aircraft
degradation dataset 3. Fit and Predict NeuralForecast 4.
Evaluate PredictionsYou can run these experiments using GPU with Google Colab.
import loggingimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom neuralforecast.models import NBEATSxfrom neuralforecast import NeuralForecastfrom neuralforecast.losses.pytorch import HuberLossfrom datasetsforecast.phm2008 import PHM2008
/Users/marcopeix/dev/neuralforecast/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html from .autonotebook import tqdm as notebook_tqdm2026-04-02 15:43:47,243 INFO util.py:154 -- Missing packages: ['ipywidgets']. Run `pip install -U ipywidgets`, then restart the notebook server for rich notebook output.2026-04-02 15:43:47,362 INFO util.py:154 -- Missing packages: ['ipywidgets']. Run `pip install -U ipywidgets`, then restart the notebook server for rich notebook output.
Here we will load the Prognosis and Health Management 2008 challenge
dataset. This dataset used the Commercial Modular Aero-Propulsion System
Simulation to recreate the degradation process of turbofan engines for
different aircraft with varying wear and manufacturing starting under
normal conditions. The training dataset consists of complete
run-to-failure simulations, while the test dataset comprises sequences
before failure.
NeuralForecast methods are capable of addressing regression problems
involving various variables. The regression problem involves predicting
the target variable yt+h based on its lags y:t, temporal
exogenous features x:t(h), exogenous features available at the
time of prediction x:t+h(f), and static features x(s).The task of estimating the remaining useful life (RUL) simplifies the
problem to a single horizon prediction h=1, where the objective is to
predict yt+1 based on the exogenous features x:t+1(f) and
static features x(s). In the RUL estimation task, the exogenous
features typically correspond to sensor monitoring information, while
the target variable represents the RUL itself.P(yt+1∣x:t+1(f),x(s))
In the original PHM2008 dataset the true RUL values for the test set are
only provided for the last time cycle of each enginge. We will filter
the predictions to only evaluate the last time cycle.RMSE(yT,y^T)=∣Dtest∣1∑i(yi,T−y^i,T)2
from utilsforecast.evaluation import evaluatefrom utilsforecast.losses import rmse