Revealjs Presentation

Julia-themed Quarto

pat-alt

2024-07-08

Introduction

This Quarto notebook generates Julia-themed output. The theme is based on the default Quarto theme and adds various custom formatting options.

Fonts

  1. The theme uses the JuliaMono font for monospace text and code.
  2. For headers and blockquotes, the theme uses the Barlow font.
  3. For all other text, the theme uses the Roboto font, just like the Julia website.
  4. Also available is the Bangla MN by Muthu Nedumaran of Murasu Systems, which is closely related to the official Julia logo font.

Bangla MN Copyright

This Bangla MN font is copyrighted by MN, so make sure you are allowed to use it.

Code

Inline code looks like this print("hello 🌍"). Code blocks look like this (Revealjs not affected):

using CounterfactualExplanations, TaijaData

# Data and Classifier:
counterfactual_data = CounterfactualData(load_linearly_separable()...)
M = fit_model(counterfactual_data, :Linear)

# Select random sample:
target = 2
factual = 1
chosen = rand(findall(predict_label(M, counterfactual_data) .== factual))
x = select_factual(counterfactual_data, chosen)

# Counterfactual search:
generator = GenericGenerator()
ce = generate_counterfactual(x, target, counterfactual_data, M, generator)

Callouts

Note

This is a note in julia_blue. Note that for Revealjs, icons are deactivated for callouts by default.

Tip

This is a tip in julia_green.

Caution

This is a caution callout in julia_purple.

Warning

This is a warning in julia_purple (lighter).

Important

This is an important callout in julia_red.

Maths

Of course, Quarto supports LaTeX maths, for which we use default settings.

Let t\in\{0,1\} denote the target label, M the model (classifier) and {x}^{\prime} \in \mathbb{R}^D the vector of counterfactual features. In order to generate recourse the GenericGenerator optimizes the following objective function through steepest descent

x\prime = \arg \min_{x\prime}  \ell(M(x\prime),t) + \lambda h(x\prime)

where \ell denotes some loss function targeting the deviation between the target label and the predicted label and h(\cdot) is a complexity penalty generally addressing the realism or cost of the proposed counterfactual.

QR Code on Title Slide

To add a custom QR code to the title slide, just specify the path to the image in the front matter of the document:

title-slide-attributes:
    data-background-image: [path-to-image]