{% extends 'main.html' %} {% block content %} {% load static %}

Counterfactuals and Explainability

{% if dataset_type == "timeseries" %}
Understanding Counterfactuals & Explainable AI

Counterfactual explanations are a crucial component of explainable AI (XAI). They answer "what-if" questions, illustrating how changing certain features of an input can alter the model's prediction.

About WILDBOAR

WILDBOAR is a Python package designed for efficient and scalable counterfactual analysis on time-series data. It provides robust tools to generate counterfactual explanations and supports various algorithms for explainability.

Workflow for Counterfactual Analysis

Follow these steps to generate and analyze counterfactual explanations:

  1. Step 1: Pick a pre-trained classifier from the list provided.
  2. Step 2: Pick a time-series sample by deciding on its class label and selecting one of the 10 examples from the "Example Entries" dropdown list.
  3. Step 3: Click "Run Counterfactual" to see the generated explanation and how changes impact the model's prediction.

Gain deeper insights into model behavior with our interactive counterfactual analysis tools.

{% elif dataset_type == "tabular" %}
Understanding Counterfactuals for Tabular Data with DICE ML

Counterfactual explanations are a crucial aspect of explainable AI (XAI), offering insights into how changing certain features can alter the prediction outcome. For tabular data, we use DICE ML (Diverse Counterfactual Explanations for ML) to generate diverse and actionable counterfactual explanations.

About DICE ML

DICE ML is a powerful Python library designed for generating diverse counterfactual explanations. It supports a range of machine learning models and provides a flexible framework for understanding model decisions by offering possible alternatives.

Workflow for Counterfactual Analysis on Tabular Data

Follow these steps to perform counterfactual analysis on tabular data:

  1. Step 1: Pick a pre-trained model and observe the t-SNE plot, which visualizes the data points.
  2. Step 2: Click on a data point in the t-SNE plot to view its feature values and understand its position.
  3. Step 3: Decide on the features you want to vary for counterfactual generation. This selection helps guide the creation of meaningful counterfactual points.
  4. Step 4: Choose from the generated counterfactual points and visualize their impact as they are displayed on the t-SNE plot.

This workflow ensures a comprehensive understanding of model predictions and their sensitivities, empowering you to make data-driven decisions.

{% endif %} {% if df_name %} {% endif %}
Step 1: Pick a Pre-trained Model/Classifier
Available Pretrained Models/Classifiers
{% csrf_token %} {% if not df_name %}

The available pre-trained models will show up here. You first need to pick or upload a dataset.

{% elif not available_pretrained_models_info %}

There are no available pre-trained models for {{df_name}}. Please train a model.

{% elif dataset_type == "tabular" %}
{% for value, text in available_pretrained_models_info %}
{% endfor %}
{% elif dataset_type == "timeseries" %}
Method
{% endif %}
{% if dataset_type == "timeseries" %} {% endif %}
{% if dataset_type == "tabular" %} {% endif %} {% if dataset_type == "tabular" %} {% elif dataset_type == "timeseries" %}
{% endif %}
{% endblock content %}