Home » No-Code Machine Learning » Unusual Activity

How to Detect Unusual Activity in Your Data

Anomaly detection models learn the normal patterns in any dataset and automatically flag records that deviate from those patterns. This works for any type of data where "unusual" matters: website traffic, server metrics, user behavior, financial records, inventory levels, or sensor readings. Train the model on your normal data, then let it continuously monitor new data and alert you when something does not look right.

Where Unusual Activity Detection Applies

This is one of the most versatile ML applications because almost every business has data where detecting outliers is valuable:

Website and Application Monitoring

Train on normal traffic patterns: page views per hour, unique visitors, bounce rate, average session duration, error rates, and API response times. The model learns your daily and weekly rhythms. When traffic suddenly spikes or crashes, when error rates climb, or when response times degrade, the model flags it before your customers notice. This catches issues that fixed threshold alerts miss, like a slow 20% decline in response time that is not enough to trigger a hard limit but clearly indicates a problem.

User Behavior Analysis

Train on normal user sessions: pages visited, actions taken, time between clicks, navigation patterns, and feature usage. The model detects unusual sessions that might indicate bot traffic, account compromise, confused users hitting dead ends, or power users discovering unintended functionality. This is particularly useful for identifying automated scrapers, credential stuffing attempts, and suspicious account activity without writing specific rules for each scenario.

Financial Record Monitoring

Beyond transaction fraud detection, anomaly detection can monitor expense reports, invoice amounts, payroll entries, and accounting records. Unusual entries like an expense twice the normal amount, an invoice from a new vendor with suspicious details, or a payroll adjustment at an odd time get flagged automatically. This provides a continuous audit function without manual review of every record.

Inventory and Supply Chain

Train on normal inventory movement: daily sales velocity, restocking frequency, shrinkage rates, and supplier delivery patterns. Detect unusual shrinkage (possible theft), demand spikes before you run out, supply disruptions when deliveries are late or short, and pricing anomalies in purchase orders.

Data Quality Monitoring

Train on your normal data patterns and run incoming records through the model. New records that are anomalous might contain data entry errors, format problems, impossible values, or corrupted data. This catches quality issues automatically without writing validation rules for every possible error type.

Setting Up Anomaly Detection

Step 1: Collect a baseline of normal data.
Export a dataset of records that represent normal operations. For website monitoring, this might be hourly traffic metrics over the past 3-6 months. For user behavior, export session data from legitimate users. The key is training on clean, normal data so the model learns what "expected" looks like. Remove any known incidents or anomalous periods from the training set.
Step 2: Upload and train isolation forest.
Upload to the Data Aggregator app and select isolation forest. Set the contamination parameter to match your expected anomaly rate. For monitoring applications, 1-3% is a good starting point, meaning you expect 1-3% of new data points to be genuinely unusual.
Step 3: Score new data continuously.
Feed new data records through the model as they arrive. Each record gets an anomaly score. Records above your threshold get flagged for review. Because scoring costs zero credits, you can check every record in real time without worrying about volume.
Step 4: Set up automated alerts.
Use workflow automation to trigger alerts when anomalies are detected. Send an email to your ops team, post to a Slack channel, create a support ticket, or take automated corrective action depending on the anomaly type and severity.

Tuning Sensitivity

The biggest practical challenge with anomaly detection is balancing sensitivity. Too sensitive and you drown in false alarms. Not sensitive enough and you miss real issues.

Start with moderate sensitivity and track your results for a week. Count how many flags are genuine issues versus false positives. If your team is investigating 50 alerts and only 5 are real problems, reduce sensitivity. If you are getting 3 alerts and all are real but you know you missed other issues, increase sensitivity.

Different data streams may need different thresholds. Server errors might warrant high sensitivity (you want to catch every incident), while user behavior analysis might use lower sensitivity (some variation is expected and harmless).

Retrain as your baseline evolves. If your business grows, your "normal" changes. A website that used to get 1,000 daily visitors now gets 5,000. If you do not retrain, the model will flag your new normal traffic as anomalous. Retrain quarterly or whenever your business undergoes significant changes. See How to Retrain Models.

Detect unusual activity automatically with zero per-check cost. Train an anomaly detection model on your data today.

Get Started Free