Skip to main content
Alert users on Slack if a prediction is made which is above a certain threshold, e.g. a fraudulent sales transaction is detected. This feature provides users with real-time notifications of critical events and allows them to take immediate action. By setting the threshold for the alert, users can customize their notifications based on their specific needs and risk tolerance. With this feature, our users can stay informed and make decisions in a timely manner. This tutorial is tailored for the Anomaly/Fraud Detection model, but you can modify it to work with other models as well.

Import required modules

Load new records

We will read new records, where the prediction is null. Make sure you add a “Prediction” column first in the spreadsheet view of the table.

Data Preprocessing

For predicting, we have to prepare the data in the same format as it was trained on.
Note: It’s recommended to add a “Try/Except” statement, in case there are no records to update other wise it will throw errors in the future.

Load the model & predict

Sending Slack notifications

After making the predictions we will iterate over them and if a prediction is 1 (which means fraud) we will send an alert notification to slack.

What’s Next

  1. You can make predictions on real-time incoming data using the saved model. Learn more about making real-time predictions on new incoming data.
  2. Using Peliqan you can create an app for business users to consume the model you have made in a simple and intuitive UI. Learn more about creating apps for users to consume your model.