predict_anomalies
Analyze vibration signals to predict anomalies and assess equipment health using a trained model. Applies complete preprocessing pipeline for accurate diagnostics.
Instructions
Predict anomalies in new signal using trained model.
Applies the complete pipeline:
1. Segment signal
2. Extract features
3. Apply scaler (from training)
4. Apply PCA (from training)
5. Predict with trained model
6. Calculate anomaly ratio and overall health
Args:
signal_file: Name of CSV file to analyze
model_name: Name of trained model (default: 'anomaly_model')
ctx: MCP context for progress/logging
Returns:
AnomalyPredictionResult with predictions and health assessment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signal_file | Yes | ||
| model_name | No | anomaly_model |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_segments | Yes | Number of segments analyzed | |
| anomaly_count | Yes | Number of anomalies detected | |
| anomaly_ratio | Yes | Ratio of anomalies (0-1) | |
| predictions | Yes | Predictions per segment: 1=normal, -1=anomaly | |
| anomaly_scores | No | Anomaly scores if available | |
| overall_health | Yes | Overall health status: 'Healthy', 'Suspicious', 'Faulty' | |
| confidence | Yes | Confidence level: 'High', 'Medium', 'Low' |