PdMLabs documentation#
PdMLabs is a free and open-source Python library created to help data scientists identify early signs before events of interest and model time-to-event prediction.
Understand what PdMLabs is all about
Get up and running in less than 5 minutes
Explore real-world examples and use cases
Learn about Experiments, Methodologies, and more
Complete API documentation
Installation#
pip install pdmlabs
Requirements: Python >= 3.11
TL;DR#
Load your data:
from pdmlabs.utils.dataset import Dataset
df=pd.read_csv("data/ims.csv")
dataset_handler = Dataset(df,datetime_column="timestamp",train_sources=0.6,val_sources=0.2,test_sources=0.2)
Train_Val_data, Train_Test_data = dataset_handler.get_unsupervised_dataset() # for early signs detection using anomaly detection
# Depending on the goal of your analysis, you can also get the data for different modeling approaches:
# Train_Val_data, _ = dataset_handler.get_rul_dataset() # for early signs detection using semi-supervised anomaly detection
# Train_Val_data, _ = dataset_handler.get_rul_dataset() # for early signs detection using classification
# Train_Val_data, _ = dataset_handler.get_rul_dataset() # for time-to-event prediction using regression
# Train_Val_data, _ = dataset_handler.get_unsupervised_dataset() # for time-to-event prediction using Survival Analysis
Perform your experiment (For guidance on how to choose the right experiment for your case, check the 📚 Concepts):
from pdmlabs.experiment.batch.auto_profile_semi_supervised_experiment import AutoProfileSemiSupervisedPdMExperiment
from pdmlabs.RunExperiment import run_experiment
# available Anomaly detection experiments: AutoProfileSemiSupervisedPdMExperiment,IncrementalSemiSupervisedPdMExperiment,UnsupervisedPdMExperiment,SemiSupervisedPdMExperiment
# Classification experiments: SupervisedPdMExperiment
# Time-to-event regression experiments: SupervisedRULPdMExperiment
# Time-to-event with Survival Analysis experiments: Supervised_SA_PdMExperiment
experiments = [AutoProfileSemiSupervisedPdMExperiment]
experiment_names = ['My first experiment']
fit_size=1000 # initial data to fit, this is specific to AutoProfileSemiSupervisedPdMExperiment
from pdmlabs.method.isolation_forest import IsolationForest
from pdmlabs.method.lof_semi import LocalOutlierFactor
methods = [IsolationForest,LocalOutlierFactor]
param_space_dict_per_method = [{'n_estimators': [200,100],'max_samples': [200,100],'random_state': [42],
'max_features': [0.8,0.5],'bootstrap': [True,False]},
{'n_neighbors':[2,3,5,10,20]}]
method_names = ["IF","LOF"]
run_experiment(Train_Val_data, methods, param_space_dict_per_method, method_names,
experiments, experiment_names, mlflow_port=5000,
MAX_RUNS=4, MAX_JOBS=1, INITIAL_RANDOM=1, optimization_param="AD1_AUC", debug=True,
maximize=maximize,profile_size=profile_for_test)
Best score: 0.5741854636591478: 100%|██████████| 3/3 [00:03<00:00, 1.11s/it]
My first experiment IF
{'best_params': {'init_profile_size': 1000, 'method_bootstrap': True, 'method_max_features': 0.8, 'method_max_samples': 200, 'method_n_estimators': 100, 'method_random_state': 42, 'profile_size': 2}, 'best_objective': 0.5741854636591478}
Best score: 0.6392039: 100%|██████████| 3/3 [00:03<00:00, 1.11s/it]
My first experiment LOF
{'best_params': {'n_neighbors': 8}, 'best_objective': 0.6392039}
Process finished with exit code 0
Key Features#
Get instant alerts when your data quality drops below your defined thresholds
Choose from Classification, multiple Anomaly Detection flavors, Regression, and Survival Analysis modeling for finding early signs before events of interest or predicting time to event.
Experiments leverage Bayesian Optimization to find the best model and hyperparameters for your data
Add custom models by implementing a simple interface.
Keep track of experiments and check results using Mlflow dashboard.
Perfect for
Predictive Maintenance monitoring sensor data for early signs of equipment failure
Data Scientists building robust models for time-to-event prediction
Analytics Teams seeking automated generation of insights from experimental analysis results
The framework is particularly useful when you need to:
Identify the most suitable methodology for a specific PdM case, especially when the appropriate modeling approach or technique flavor is not obvious.
Discover algorithm configurations that meet user-defined performance thresholds, enabling the use of interpretable methods without sacrificing predictive capability.
Analyze trade-offs between predictive performance and computational efficiency, which is crucial when monitoring large fleets of assets or operating under resource or environmental constraints.
Perform comparative evaluations of alternative solutions, helping determine whether investing in a new method provides meaningful improvements over existing approaches.
Next Steps#
Ready to dive in? Here are some suggested paths:
New to PdMLabs? → Start with 📜 Our Manifesto
Ready for action? → Jump straight to the Quickstart
Eager to deepen understanding? → Read 📚 Concepts
Looking for examples? → Check out 💡 Examples
Need detailed configuration? → Browse 📖 User Guide
Publications#
Please cite the following papers when using PdMLabs for your research:
Anastasios Papadopoulos, Apostolos Giannoulidis, Anastasios Gounaris, and John Paparrizos. 2026. The Power of Anomaly Detection in Predictive Maintenance: [Experiments & Analysis]. Proc. ACM Manag. Data 4, 3, Article 242 (June 2026), 33 pages. https://doi.org/10.1145/3802119
@article{10.1145/3802119,
author = {Papadopoulos, Anastasios and Giannoulidis, Apostolos and Gounaris, Anastasios and Paparrizos, John},
title = {The Power of Anomaly Detection in Predictive Maintenance: [Experiments \& Analysis]},
year = {2026},
issue_date = {June 2026},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {4},
number = {3},
url = {https://doi.org/10.1145/3802119},
doi = {10.1145/3802119},
journal = {Proc. ACM Manag. Data},
month = may,
articleno = {242},
numpages = {33},
keywords = {predictive maintenance, time-series}
}
Anastasios Papadopoulos, Apostolos Giannoulidis, Anastasios Gounaris, Towards AutoML Solutions for Predictive Maintenance, Procedia Computer Science, Volume 280, 2026, Pages 791-798, ISSN 1877-0509, https://doi.org/10.1016/j.procs.2026.04.099.
@article{PAPADOPOULOS2026791,
title = {Towards AutoML Solutions for Predictive Maintenance},
journal = {Procedia Computer Science},
volume = {280},
pages = {791-798},
year = {2026},
note = {The 17th International Conference on Ambient Systems, Networks and Technologies Networks (ANT)/ the 9th International Conference on Emerging Data and Industry 4.0 (EDI40)},
issn = {1877-0509},
doi = {https://doi.org/10.1016/j.procs.2026.04.099},
url = {https://www.sciencedirect.com/science/article/pii/S1877050926011129},
author = {Anastasios Papadopoulos and Apostolos Giannoulidis and Anastasios Gounaris},
keywords = {Predictive Maintenance, Time-Series, AutoML},
}
Acknowledgments#
PdMLabs is developed by Anastasios Papadopoulos and Apostolos Giannoulidis and supported by the Data Engineering (DELAB) Team of Datalab AUTh, under the supervision of Prof. Anastasios Gounaris.
PdMLabs incorporates RUL and Survival Analysis evaluation components from the TITEUF project. Licensed under the Apache License, Version 2.0.