Use Cisco Deep Time Series Model Showcase examples
The AI Toolkit Showcase provides examples of using the Cisco Deep Time Series Model (CDTSM) for forecasting and anomaly detection.
There are 7 examples available. Each example opens an AI Toolkit Assistant with its sample data and settings filled in. The data comes from lookup files in the AI Toolkit, meaning nothing needs to be indexed.
The examples are organized into two categories:
-
Cisco Deep Time Series Model forecasting: Explore examples that forecast future values of time series data.
-
Cisco Deep Time Series Model anomaly detection: Explore examples that detect anomalies in time series data.
Available examples
The following examples are available in the Showcase:
| Example | Assistant | Description | History |
|---|---|---|---|
| Forecast Network Link Throughput | Forecast Time Series | Forecasts network link traffic based on daily patterns to help plan capacity. Displays a forecast with actual values within the forecast band. | 14 days |
|
Predict Server CPU Saturation |
Forecast Time Series | Forecasts CPU usage for a new server using only three hours of historical data, without training. | 4 days |
| Forecast Taxi Ride Demand | Forecast Time Series | Forecasts taxi demand over the next few days based on historical daily patterns. | 6 days |
| Detect a Known Login Incident | Smart Outlier Detection | Learns daily and weekly login patterns to detect unusual activity that fixed thresholds might miss. | 14 days |
| Detect a Level Shift (Infrastructure) | Smart Outlier Detection | Detects shifts in infrastructure metrics to a new level, even when individual values aren't extreme. Flags the change until the metric settles. | 7 days |
| Detect Unusual Holiday Taxi Demand | Smart Outlier Detection | Identifies unusual taxi demand during New Year's early hours by detecting activity that differs from typical time-of-day patterns. | 14 days |
| Monitor 100 Web Hosts from Their Logs | Smart Outlier Detection | Detects spikes, shifts, and outages across 100 web hosts in a single search, without training or per-host configuration. | 7 days |
Run an anomaly example
Anomaly examples open in Smart Outlier Detection with the search already entered.
-
Define. The search is pre-filled but has not run. Select the blue search button and wait for Search complete, then select Next.
-
Learn. A note at the top reads "To run this example, select Detect Outliers at the bottom of this step." Select Detect Outliers from the bottom of the left panel.
-
Evaluate. With Cisco Deep Time Series Model selected, as each example opens, Detect Outliers runs both methods, so you do not need to select an algorithm to compare them. CDTSM's counts and chart appear first, and are followed by the DensityFunction result on the same data is drawn in the same kind of chart.
In the chart, the solid line is the Actual series, and the dashed line is CDTSM's Prediction for each point, with its Confidence Interval in purple. The pink band outlined in red is the Threshold, the normal range. A red column is an Anomaly Region, a run of anomalous points: a run starts when at least 2 of 3 consecutive points are outside the band and ends once 3 in a row are back inside it. A single point outside the band does not start a run. The dashed vertical lines marked Detection mark the window that is scored (the Detection length setting).
-
(Optional) DensityFunction on its own. The comparison in step 3 already shows DensityFunction, so you can skip this step. To open its own view, with a threshold slider and a Density chart, select DensityFunction under Algorithm and then Detect Outliers. Select Cisco Deep Time Series Model and Detect Outliers again to return. The counts match the ones from before the switch.
-
Review. Select Next. Anomaly Segments lists each run of anomalous points with its start, end and duration. Anomaly Detection Chart shows the series with CDTSM's forecast, its normal range and the anomalous regions.
Run a forecast example
Forecast examples open in Forecast Time Series and start forecasting on their own.
- Wait for the forecast to finish. The chart shows the series, the forecast and its 90% confidence band. The shaded holdback area at the right is the part that was held back and forecast.
- Read the three tiles under the chart: R² Statistic (higher is better), Root Mean Squared Error (lower is better) and Forecast Outliers (held-back points outside the band; lower is better).
-
Following those tiles, the Kalman filter on the same held-back values shows the same three tiles for the Kalman filter, for comparison. It uses the Kalman filter's default method, LLP, except in Predict Server CPU Saturation, which uses LLT (local level trend) because that series climbs.
-
To run the Kalman filter yourself, set the Algorithm to Kalman Filter and select Forecast. Its tiles equal the comparison row. Switch Algorithm back to Cisco Deep Time Series Model and select Forecast to return to CDTSM's result.
Detect a Known Login Incident
Scenario: Logins to one application rise and fall with the working day. A short burst at night, a credential-stuffing attack, brings login volume to the level of a normal afternoon. A fixed threshold low enough to catch the burst would also be crossed every weekday afternoon.
Data: login_activity.csv: synthetic logins per 5 minutes, 16 days. The first 14 days are history. The last 2 days (576 points) are scored.
How to use: Follow the Run an anomaly example steps with the Known Login Incident tile.
Expected results:
- CDTSM: Anomalous Points 18 and Anomaly Segments 1: the attack burst. No other points in the two scored days are flagged.
- DensityFunction (split by hour of day and day of week): 24 outliers. It flags the same 18 points and 6 points in the overnight low period.
In the following image, CDTSM flags 18 anomalous points in one segment. The red region marks the attack burst, and the dashed lines mark the scored window.
In the following image, under the CDTSM result, DensityFunction flags 24 outliers in the same data.
Detect a Level Shift (Infrastructure)
Scenario: A service metric moves from one level to another and stays there. No single value is extreme, but the new level differs from the recent baseline. An infrastructure change, such as a deployment, a failover or a configuration change, can move a service metric to a new baseline in this way.
Data: service_metric_level_shift.csv: one synthetic service metric, one point per 5 minutes, 3,267 points. It is normalized and has no unit (the field is value), so it can go below zero. It runs near 0.42, then rises to a new level near 1.06 and stays there. The last 1,251 points (about 4.3 days) are scored, and the 7 days before them are history.
How to use: Follow the Run an anomaly example steps with the Level Shift in a Service Metric tile.
Expected results:
- CDTSM: Anomalous Points 164 and Anomaly Segments 1. The shift is flagged while the metric settles, and the chart shows the band adapting to the new level. None of its points is before the shift. The one-point dip to −0.50 just before the shift is outside the band but not flagged, because a single point does not start a run.
- DensityFunction: 725 outliers: 517 after the shift, 141 in the shift itself and 67 before it. It is fit once, on the 7 days before the scored window, and applied to the whole window. Values at the new level are outside the range of the 7 days it was fit on, so the points after the shift are flagged as well as the shift. The 67 points before it are in the day and a half before the shift, where the metric has drifted up to 0.49 to 0.55, at the top of and above the fitted range of 0.30 to 0.51.
- DensityFunction refit each day: the example fits DensityFunction once. On the same data, refitting it each day on the 7 days before that day and applying it to that day (5 fits) flags 320 points: 51 before the shift, 137 in it and 132 after it. 130 of the 132 are on the day of the shift. From the next day, the new level is part of the 7 days it is fit on, and 2 points are flagged.
In the following image, CDTSM flags 164 anomalous points in one segment while the metric settles at its new level.
In the following image, DensityFunction flags 725 outliers, mostly after the shift and some before it, where the metric begins to drift upward.
Detect Unusual Holiday Taxi Demand
Scenario: After the first hour of New Year's Day, the number of taxi passengers resembles an evening rush hour, which is not typical of that time of night. The scored window starts on New Year's Eve, so you can see which of the busy periods each method flags.
Data: taxi_ride_demand_new_year.csv: New York City taxi passengers per 30 minutes, 768 points. The last 96 (48 hours: New Year's Eve and New Year's Day) are scored, and the 14 days before them are history.), so it can go below zero. It runs near 0.42, then rises to a new level near 1.06 and stays there. The last 1,251 points (about 4.3 days) are scored, and the 7 days before them are history.
How to use: Follow the Run an anomaly example steps with the Unusual Holiday Taxi Demand tile.
Expected results:
- CDTSM: Anomalous Points 9 and Anomaly Segments 1: the early hours of 1 January, from 12:30 to 4:30 a.m. The Learn step shows a notice that CDTSM is more accurate at 1-minute or 5-minute resolution. This data is every 30 minutes, so the notice appears.
- DensityFunction (split by hour of day and day of week): 21 outliers. 8 are in the same early hours, and the other 13 are earlier on New Year's Eve. With 30-minute data and 2 weeks of history, each hour-and-weekday group has only about 4 points: for Tuesday 10 to 11 a.m., the 10:00 and 10:30 values on each of the 2 Tuesdays. After you switch to DensityFunction, the Learn step warns that some groups have too few training points, which will likely result in poor accuracy for those groups. CDTSM is not split into groups: it forecasts each point from the preceding history of the series.
- New Year's Eve evening: neither method flags the busy evening of 31 December (8 to 10:30 p.m.).
In the following image, CDTSM flags 9 anomalous points in one segment during the early hours of 1 January.
In the following image, under CDTSM's result, DensityFunction flags 21 outliers when split by hour of day and day of week.
Monitor 100 Web Hosts from Their Logs
Scenario: Score a fleet of 100 hosts in one search. Three of the 100 hosts have a problem in the last day: a short spike on web-017, a sustained shift on web-042 and a two-hour outage on web-073.
Data: fleet_web_logs.csv: synthetic log lines, one per host per 5 minutes, 100 hosts, 230,400 rows. The search extracts host and requests and sums requests per host and time. CDTSM is split by host and scores the last 288 points (one day) of each host.
How to use: Follow the Run an anomaly example steps with the Web Host Fleet tile. Scoring 100 hosts takes longer than the single-series examples.
Expected results:
- Counts: Series Scored 100, Series With Anomalies 3, Anomalous Points 163, Anomaly Segments 3.
- Host dropdown: the hosts that CDTSM or DensityFunction flags. CDTSM's come first: web-042 (136 points, 1 segment), web-073 (24) and web-017 (3). Each entry also shows what DensityFunction found in that host. Pick a host and both charts show it at the same scale.
- DensityFunction (split by host): about 145 outlier points on about 10 to 14 hosts. It flags web-042's shift and does not flag web-073's outage. DensityFunction fits on a random sample when there are more than 100,000 rows to fit, here about half of the 201,600 history rows, so its counts vary slightly between runs. In a test on 40 of the hosts, where the fit is not sampled, it flags web-073's outage.
- Hour of day and day of week: DensityFunction is split by host only, not by host, hour of day and day of week as in the Login and Holiday Taxi examples. For 100 hosts that is 100 × 24 × 7 = 16,800 groups, and DensityFunction stops above 5,000 groups ("The number of groups can not exceed 5000"). Each group would also have only 12 points of history. Splitting by host and hour of day (2,400 groups) runs and flags 535 points, 335 of them on 93 of the 97 other hosts.
- Review: one row per anomaly segment, with a host column.
In the following image, the summary shows 100 hosts scored, 3 with anomalies, and 163 anomalous points in 3 segments.
In the following image, the host drop-down lists hosts flagged by CDTSM or DensityFunction, with CDTSM's results first.
In the following image, for the same 100 hosts, DensityFunction flags 146 outlier points across 13 hosts.
In the following image, the Review table lists one anomaly segment per flagged host and includes a host column.
Forecast Network Link Throughput
Scenario: Forecast the hourly traffic on a network link for the next 5 days. The traffic follows a daily pattern and does not trend upward over these weeks, so the example shows how closely each method follows that pattern. It is not a capacity-growth forecast.
Data: internet_traffic.csv: bits per hour on a transatlantic link of a private ISP. 14 days (336 hours) are history, and the next 128 hours are held back and forecast.
How to use: Follow the Run a forecast example steps with the Network Link Throughput tile.
Expected results:
- CDTSM: R² 0.6455, RMSE 15.18B, Forecast Outliers 5. The forecast follows the daily cycle and most actual values fall inside the band.
- Kalman filter: R² 0.2133, RMSE 22.61B, Forecast Outliers 32.
- Timing: the example sums the file's 5-minute rows per hour and changes no values. In the file, both the daily and the weekly cycle are about 2% shorter than 24 hours and 7 days (23.6 hours and about 165 hours), so its timestamps run slightly fast against real time. The daily peaks therefore arrive about 0.4 hours earlier each day, and both forecasts drift against them.
In the following image, the forecast chart shows the 90% confidence band over the held-back part of the series.
In the following image, the tiles compare CDTSM and Kalman filter results on the same held-back values.
Predict Server CPU Saturation
Scenario: A server's CPU utilization has been climbing for 4 days, and a job that runs every 30 minutes adds a short spike. Forecast when it will first cross 75%.
Data: server_cpu_utilization.csv: synthetic CPU utilization, as a fraction from 0 to 1, every 5 minutes, 1,352 points. The first 1,224 (4 days 6 hours) are history and stay below 0.74. The last 128 (10 hours 40 minutes) are held back and forecast.
How to use: Follow the Run a forecast example steps with the Predict Server CPU Saturation tile. The Alert threshold field is pre-filled with 0.75.
Expected results:
- CDTSM: R² 0.9663, RMSE 0.01, Forecast Outliers 2. FThe forecast first reaches 0.75 after 2.6 hours. Actual values first reach it after 2.1 hours. The forecast repeats the job spikes on the climbing baseline, and a spike is the first value to reach 0.75.
- Kalman filter (LLT): R² 0.3835, RMSE 0.02, Forecast Outliers 0. Its forecast is a smooth line that reaches 0.75 after 8.3 h. Its band covers the spikes, so no actual value falls outside it.
In the following image, the forecast chart continues the climb and 30-minute job spikes through the held-back part of the series.
In the following image, the result tiles show CDTSM with the 0.75 alert threshold and, below it, the Kalman filter with LLT.
Forecast Taxi Ride Demand
Scenario: Forecast taxi demand for the next few days and find when it will reach a level you care about.
Data: taxi_ride_demand.csv: New York City taxi passengers per 30 minutes, 416 points. The first 288 points (6 days) are history, and the last 128 points (64 hours) are held back and forecast.
How to use: Follow the Run a forecast example steps with the Taxi Ride Demand tile. The Alert threshold field is pre-filled with 24000.
To try your own threshold, change Alert threshold.
Expected results:
- CDTSM: R² 0.9373, RMSE 1,655.70, Forecast Outliers 2. The forecast and actual values both first reach 24,000 8.5 hours after the forecast begins.
- Kalman filter: R² 0.8048, RMSE 2,920.39, Forecast Outliers 18. Forecast reaches it in reads The forecast does not reach 24,000; actual values reach it after 8.5 hours.
In the following image, the forecast chart shows its confidence band over the 64-hour holdback.
In the following image, the result tiles show CDTSM with a 24,000 threshold. Both the forecast and actual values reach it after 8.5 hours.
In the following image, with the Kalman filter selected, the forecast stays below the threshold while actual values cross it after 8.5 hours.
Use your own data
After an example finishes, Use your data opens the same Assistant as empty, with CDTSM selected and the time range set to the last 24 hours, so you can point it at your own search or index. In the anomaly examples the button is under the CDTSM chart on the Evaluate tab. In the forecast examples it is at the bottom of the page. Widen the time range if your series needs more history than 24 hours.
For several series in one search, set Split by field (anomaly detection) to a field that names each series, such as host. Each value is scored as its own series, and the Evaluate step offers a dropdown of the series that CDTSM or DensityFunction flags, to look at one. The field must identify a series whose points are at a regular interval. A calendar field such as day of week does not work: CDTSM stops with an error at the top of the left panel in the Learn step, so scroll the panel up to see it. The error reports irregular resolutions for one series, and duplicate timestamps within a group when several series share the same timestamps.