diff --git a/fraud_detection/fraud_response.py b/fraud_detection/fraud_response.py index b4ee601cd..199695e3e 100644 --- a/fraud_detection/fraud_response.py +++ b/fraud_detection/fraud_response.py @@ -6,13 +6,13 @@ def __init__(self, fraud_detection_model, anomaly_detection): def respond_to_fraud(self, transactions): for transaction in transactions: fraud_level = self.fraud_detection_model.predict_fraud(transaction) - if fraud_level == 'fraudulent': + if fraud_level == "fraudulent": anomaly_score = self.anomaly_detection.detect_anomalies(transaction) if anomaly_score == -1: # Implement fraud response strategies here # For example, you could flag the transaction for review or decline it altogether - print('Fraudulent transaction detected: Flagged for review') + print("Fraudulent transaction detected: Flagged for review") else: - print('Anomalous transaction detected: Flagged for review') + print("Anomalous transaction detected: Flagged for review") else: - print('Non-fraudulent transaction detected: Transaction approved') + print("Non-fraudulent transaction detected: Transaction approved")