5.3.3.1. gemini_application.esp.esp
ESP application for pump performance analysis and pump curve generation.
Classes
|
Class for application ESP calculation. |
- class gemini_application.esp.esp.ESPApp[source]
Bases:
ApplicationAbstractClass for application ESP calculation.
Initialize ESP application.
- filter_sensor_data(df)[source]
Filter sensor data to remove unphysical values.
This follows the same thresholds as used in the training pipeline.
- get_sensor_data_failure_prediction()[source]
Get all sensor data required for failure prediction from database.
- plot_failure_prediction()[source]
Plot failure prediction probability over time.
The plot shows: - Probability of failure occurring within the next 30 days from each timestamp - Horizontal bands for risk zones (High/Moderate/Low) - A dashed vertical line at the selected time in forward mode
- Modes:
“forward”: x-axis is a 60-day window (30 days before and 30 days after the selected time), with a dashed line at the selected time.
“historical”: shows the full available period.
- predict_failures(model_path=None, prediction_mode='forward')[source]
Predict failures using ML model based on sensor data.
This function follows the exact preprocessing pipeline from training the model: 1. Filter unphysical values 2. Calculate Vibration from components 3. Apply rolling window average (96 points = 4 days for 1-hour data) 4. Extract 7 relevant features 5. Scale features using StandardScaler 6. Make predictions using HistGradientBoostingClassifier
- Parameters:
model_path – Path to the ML model pickle file.
prediction_mode – Mode of prediction: - “forward”: Show 60-day window (30 days before + 30 days after selected time) - “historical”: Analyze entire historical period