Julia-themed Quarto
2024-07-08
This Quarto notebook generates Julia-themed output. The theme is based on the default
Quarto theme and adds various custom formatting options.
monospace
text and code
.Bangla MN Copyright
This Bangla MN font is copyrighted by MN, so make sure you are allowed to use it.
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)
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.
Of course, Quarto supports LaTeX maths, for which we use default settings.
Let denote the target label,
the model (classifier) and
the vector of counterfactual features. In order to generate recourse the
GenericGenerator
optimizes the following objective function through steepest descent
where denotes some loss function targeting the deviation between the target label and the predicted label and
is a complexity penalty generally addressing the realism or cost of the proposed counterfactual.
To add a custom QR code to the title slide, just specify the path to the image in the front matter of the document: