# Concept drift

The Concept drift dashboard enables you to analyze the impact and magnitude of concept drift. To calculate these results, NannyML Cloud requires the analysis set to include a ground truth column.

{% hint style="info" %}
Note: Concept drift detection is currently supported only for **binary classification** use cases. For custom support in regression use cases, please [contact us on our website](https://www.nannyml.com/contact-us).
{% endhint %}

If you prefer a video walkthrough, here is our guide explaining how to use the concept drift page:

{% embed url="<https://youtu.be/-MjrtLIIq9M>" %}

Here, you can find detailed descriptions of various elements on the concept drift page:

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/f2g5R2oVZ8AAHbbWtUCy/estimated.001.jpeg" alt=""><figcaption><p>Concept shift dashboard.</p></figcaption></figure>

The **Concept** **drift** dashboard consists of three main components:

### 1. Filters

{% tabs %}
{% tab title="1.1 Segmentation" %}
Segmentation allows you to split your data into groups and analyze them separately.

For a given model, each of the columns that are selected for segmentation during configuration or in the model settings appears under the segmentation filter. Segments are then created for each of the distinct values within that column.

In the filter section, you can select the segments you want to see visualized. You can also select **All data** to visualize results for the entire dataset.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/ylLGI1QrIE32uVvUa6dm/Screen%20Shot%202024-07-25%20at%206.41.58%20PM.png" alt="" width="292"><figcaption><p>Select segments of interest</p></figcaption></figure>
{% endtab %}

{% tab title="1.2 Metrics" %}
Select which metrics you want to have displayed on the performance impact graph. Additionally, a magnitude metric illustrates the magnitude of concept drift at specific periods.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/9ze86kLTDeTBSKLYsePD/concept_shift_metrics.png" alt="" width="201"><figcaption><p>Concept shift metrics filter.</p></figcaption></figure>
{% endtab %}

{% tab title="1.3 Alert status " %}
Choose which metrics to display based on whether there are no alerts, alerts in any or only the last chunk, alerts in performance metric with the main tag, or include all charts regardless of when and if any alerts occurred.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/aMKJbZdcXdi48afaB7qP/new_alert_status.png" alt="" width="233"><figcaption><p>Alert status filter.</p></figcaption></figure>
{% endtab %}

{% tab title="1.4 Tags" %}
Filter charts by the previously specified tags.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/frZ6fRa39xaCJHeV2WuB/concept_shift_tags.png" alt="" width="204"><figcaption><p>Tags filter.</p></figcaption></figure>
{% endtab %}
{% endtabs %}

### 2. Visualizations

{% tabs %}
{% tab title="2.1 Sort by" %}
You can change the order of charts based on the metric name, number, or recency of the alerts.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/yKoImw1rRqEQVMmI9G2N/perf_sort_by.png" alt="" width="203"><figcaption><p>Sort by window.</p></figcaption></figure>
{% endtab %}

{% tab title="2.2 Ascending/descending order" %}
For all sorting methods, the icons shown below toggle between ascending and descending order. The icon displayed depends on the selected sorting method.

* **Metric Name**: The icon toggles between alphabetical order and reverse alphabetical order. The default mode is alphabetical order.
* **Nr of Alerts**: The icon toggles between ascending and descending order based on the number of alerts. The default mode displays plots with the most alerts first.
* **Recency of Alerts**: The icon toggles between showing newer alerts first and older alerts first. The default mode shows the most recent alerts first.

<div><figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/BVSz2nGixBv5xAyRazMZ/Screen%20Shot%202024-07-25%20at%205.42.46%20PM.png" alt="" width="118"><figcaption><p>Toggle for 'Nr of alerts'</p></figcaption></figure> <figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/vCE0oa7d3bEDciBgNb17/Screen%20Shot%202024-07-25%20at%205.36.52%20PM.png" alt="" width="120"><figcaption><p>Toggle for other sorting methods</p></figcaption></figure></div>
{% endtab %}

{% tab title="2.3 Date range" %}
You can select a specific period of interest which applies to all charts.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/Y2bIb85DdW7jFRsYZP9w/date_range.png" alt="" width="342"><figcaption><p>Date range window.</p></figcaption></figure>
{% endtab %}

{% tab title="2.4 Date reset" %}
To reset a previously set date period, whether using the date range or slider, simply press the "Reset" button.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/qeoZ8myWLB877HgVV4lR/plot_data_format_gifs.gif" alt=""><figcaption><p>Date range reset.</p></figcaption></figure>
{% endtab %}

{% tab title="2.5 Date slider" %}
Similar to selecting a date range, you can choose a specific period of interest by simply moving the date slider.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/qeoZ8myWLB877HgVV4lR/plot_data_format_gifs.gif" alt=""><figcaption><p>Date slider.</p></figcaption></figure>
{% endtab %}

{% tab title="2.6 Chart" %}
The charts are interactive, allowing you to hover over them for more details. Red dotted lines indicate the thresholds, while the blue line shows the metric during the reference period. The light blue line represents the metric during the analysis period. The lightly shaded area around the performance impact estimation is the metric's confidence band.

You can also zoom in on any part of a chart. Simply press and hold your mouse button, then draw a square over your area of interest. To reset the zoom, just double-click on the chart.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/dckuJzi5LRdn2XTs3D1o/concept_shift_chart.png" alt=""><figcaption><p>Concept shift chart.</p></figcaption></figure>
{% endtab %}
{% endtabs %}

### 3. Plot config

{% tabs %}
{% tab title="3.1 Plot format" %}
There are two types of plot formats: line and step. A line plot smoothly connects points with straight lines to show trends, while a step plot uses sharp vertical and horizontal lines to show exact changes between points clearly.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/pBel5DLwRTzfncNws6ZD/plot_format_gifs.gif" alt=""><figcaption><p>Plot format.</p></figcaption></figure>
{% endtab %}

{% tab title="3.2 Datasets" %}
Select datasets to zoom in on reference, analysis, or create a separate subplot for both.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/teuiFca3keuTRU2XR7Uw/datasets_gif.gif" alt=""><figcaption><p>Datasets plots.</p></figcaption></figure>
{% endtab %}

{% tab title="3.3 Plot elements" %}
Toggle on or off some components on the charts, like alerts, confidence bands, thresholds, and legends.

<figure><img src="https://content.gitbook.com/content/2wXpsFdZLc0Ed8e18KiO/blobs/HZOfNz4D7BoLXV17Ld1Z/plot_elements_correct_gif.gif" alt=""><figcaption><p>Plots elements.</p></figcaption></figure>
{% endtab %}
{% endtabs %}
