detect_outliers
Identify data points that deviate from normal patterns using statistical and machine learning methods for data quality assessment and anomaly detection in analytical workflows.
Instructions
Detect outliers in numerical columns using various algorithms.
Identifies data points that deviate significantly from the normal pattern using statistical and machine learning methods. Essential for data quality assessment and anomaly detection in analytical workflows.
Returns: Detailed outlier analysis with locations and severity scores
Detection Methods: š Z-Score: Statistical method based on standard deviations š IQR: Interquartile range method (robust to distribution) š¤ Isolation Forest: ML-based method for high-dimensional data
Examples: # Basic outlier detection outliers = await detect_outliers(ctx, ["price", "quantity"])
AI Workflow Integration: 1. Data quality assessment and cleaning 2. Anomaly detection for fraud/error identification 3. Data preprocessing for machine learning 4. Understanding data distribution characteristics
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| columns | No | List of numerical columns to analyze for outliers (None = all numeric) | |
| method | No | Detection algorithm: zscore, iqr, or isolation_forest | iqr |
| threshold | No | Sensitivity threshold (higher = less sensitive) |