HTML Article
Julia-themed Quarto
Introduction
This Quarto notebook generates Julia-themed output.
Introduction
This Quarto notebook generates Julia-themed output. The theme is based on the default
Quarto theme and adds various custom formatting options.
Fonts
- The theme uses the JuliaMono font for
monospace
text andcode
. - For headers and blockquotes, the theme uses the Barlow font.
- For all other text, the theme uses the Roboto font, just like the Julia website.
- Also available is the Bangla MN by Muthu Nedumaran of Murasu Systems, which is closely related to the official Julia logo font.
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:
= CounterfactualData(load_linearly_separable()...)
counterfactual_data = fit_model(counterfactual_data, :Linear)
M
# Select random sample:
= 2
target = 1
factual = rand(findall(predict_label(M, counterfactual_data) .== factual))
chosen = select_factual(counterfactual_data, chosen)
x
# Counterfactual search:
= GenericGenerator()
generator = generate_counterfactual(x, target, counterfactual_data, M, generator) ce
Callouts
This is a note in julia_blue. Note that for Revealjs, icons are deactivated for callouts by default.
This is a tip in julia_green.
This is a caution callout in julia_purple.
This is a warning in julia_purple (lighter).
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]