The wgrp package is a data science tool aimed at analyzing widespread generalized renewal processes. Using an approach based on WGRP (Weibull-based renewal processes) [1], the package allows one to study the behavior of systems exposed to interventions. Although generally used for technological systems, WGRP can be applied to any system on which interventions (e.g. preventive and corrective maintenance) might arise.
-
Production Systems Breakdowns: After registering when a few corrective and preventive interventions occurs, the times between these interventions can be modeled via WGRP. It makes possible to evaluate the quality of the interventions as well as to predict when new interventions will be demanded. Further, one can compare the performance of a number of systems via the respective WGRP models [2].
-
Natural Catastrophic Events: In the face of the history of when previous catastrophic events have occurred, one can model and forecast when new catastrophic events might occur. It is also possible to compare the natural condition between territories.
Furthermore, the package supports the consideration of different assumptions about the effect of maintenance through the Kijima I and II models, which represent, respectively:
- Kijima I: where the degree of restoration depends only on the time since the last intervention;
- Kijima II: where the cumulative effect of interventions is considered, reflecting more realistic scenarios in complex systems.
These models are useful for studying how partial or imperfect maintenance affects the time to next failure.
A Jupyter notebook with usage examples of most functions is available on GitHub.
To install the package, use the following command:
pip install wgrpThe wgrp_model class has fit and predict functions, which are similar to those available in other machine learning packages for ease of use.
from wgrp.model import wgrp_model# Initialize the model
model = wgrp_model()
# Example of failure data (time between failures)
data = [1, 2, 5]
# Fit the model to crash data
model.fit(data) # See the function documentation for supported data types
# Make predictions
predict = model.predict(1)See more about function documentation at: WGRP - Read the Docs
- Be sure to consult the full documentation for additional details on the parameters and data types supported by the functions.
- For more examples and advanced usage, see the Jupyter notebook available in the GitHub repository.
We would like to thank the National Council for Scientific and Technological Development (CNPq) and the Federal University of Cariri (UFCA) for granting the scholarships, and the Institutional Program for Scientific and Technological Initiation for all their support during the development of the project.
If you have any questions about the package, its usage, or tips, feel free to contact the developers:
Francisco Junior Peixoto Dantas
Paulo Renato Alves Firmino