All materials
drift-config-template.py
pydrift-config-template.py
"""
Drift detection configuration for the MedConnect matching model.
Uses Evidently AI to monitor production data against the training baseline.
"""
# Select features to monitor -- not all features are equally important
# Choose features based on their importance to match quality
MONITORED_FEATURES = [
# Add the features you want to monitor here
# Consider: which features matter most for the model's predictions?
# Consider: which features are most likely to change in production?
]
# Configure PSI thresholds -- defaults may not suit healthcare staffing
# The cost of a false alarm vs a missed drift matters for this client
DRIFT_THRESHOLDS = {
# "feature_name": threshold_value,
# Default PSI threshold is 0.25 -- is that appropriate for healthcare staffing?
}
# Reference dataset path (training data baseline)
REFERENCE_DATA_PATH = "materials/placement-data-training.csv"
# Current dataset path (recent production data)
CURRENT_DATA_PATH = "materials/placement-data-production.csv"
def configure_drift_report():
"""
Configure the Evidently AI drift detection report.
Returns a configured report object.
"""
# Configure column mapping for the dataset
# Specify which columns are numerical, categorical, and text
# Configure the data drift report with DataDriftPreset
# Set per-feature thresholds where appropriate
# Add per-region drift analysis
# Aggregate drift can mask subgroup-specific changes
pass
def run_drift_detection():
"""
Run drift detection and return results.
"""
# Load reference and current datasets
# Run the configured drift report
# Extract per-feature drift results
# Classify severity based on thresholds
pass
if __name__ == "__main__":
run_drift_detection()