Skip to content

Commit

Permalink
cohort 1, chapters 1-3 (#3)
Browse files Browse the repository at this point in the history
* cohort 1, chapters 1-3

* made slides
* edited "club intro" to link to our textbook
* added "images" as subdirectory of "slides"

* Remove extra title slide.

The "1. Preliminaries" title (in the header yaml) is what shows up in the index, but it also automatically acts as the first slide.

I also turned off incremental bulleted lists by default, because I find myself manually turning them off most of the time.

I tried to fix the styling so you wouldn't have to insert the empty spacer columns, because those are a clear sign that something is wrong (you should be able to just put content in your qmd and let styling deal with formatting), but the revealjs style fought me. I might come back to it later.

* Remove extraneous session info block.

* I don't think these callout notes are displaying the way you intend. Did you preview the slides? I feel like you must have because we discussed them, but what I'm seeing looks broken.

---------

Co-authored-by: Jon Harmon <[email protected]>
  • Loading branch information
dsollberger and jonthegeek authored Feb 1, 2025
1 parent 03115ef commit e0c62b2
Show file tree
Hide file tree
Showing 14 changed files with 205 additions and 45 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Depends:
R (>= 3.1.0)
Encoding: UTF-8
Imports:
DiagrammeR,
rmarkdown
3 changes: 2 additions & 1 deletion slides/00-club_intro.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ title: Club Meetings

# Welcome

- Welcome to the The Rust Programming Language book club!
- Welcome to the Generative AI book club!
- "book: [Generative AI Handbook: A Roadmap for Learning Resources](https://genai-handbook.github.io/) by William Brown
- These slides are available at [dslc.io/genai](https://dslc.io/genai).
- We follow the [Data Science Learning Community Code of Conduct](https://dslc.io/code_of_conduct.html).

Expand Down
92 changes: 77 additions & 15 deletions slides/01_preliminaries.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,91 @@ engine: knitr
title: "1. Preliminaries"
---

# Learning objectives
# Learning Objectives

::: nonincremental
- THESE ARE NICE TO HAVE BUT NOT ABSOLUTELY NECESSARY
:::: {.columns}

::: {.column width="45%"}
Talk about recent history in artificial intelligence

Mention mathematics prerequisites

Pick a programming language
:::

::: {.column width="10%"}

:::

::: {.column width="45%"}
![Generative AI](images/gen_ai_splash.png)

image source: [Georgetown Journal of International Affairs](https://gjia.georgetown.edu/2023/05/24/should-the-united-states-or-the-european-union-follow-chinas-lead-and-require-watermarks-for-generative-ai/)

:::

::::

## AI Landscape

![areas for artificial intelligence](images/ai_landscape.png)

image source: [RapidOps](https://www.rapidops.com/blog/generative-ai-tools/)

# Math

## Math Topics

:::: {.columns}

::: {.column width="45%"}
**Gradients** and their relation to local minima/maxima

The **chain rule** for differentiation

Matrices as **linear transformations** for vectors

Notions of **basis**/rank/span/independence/etc.
:::

::: {.column width="10%"}

:::

::: {.column width="45%"}
[calculus](https://www.youtube.com/watch?v=WUvTyaaNkzM&list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr)

[linear algebra](https://www.youtube.com/watch?v=fNk_zzaMoSs&list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab)
:::

::::


# Programming

:::: {.columns}

::: {.column width="45%"}
Python

C++

CUDA
:::

::: notes
- You can add notes on each slide with blocks like this!
- Load a deck in the browser and type "s" to see these notes.
::: {.column width="10%"}

:::

# SLIDE SECTION
::: {.column width="45%"}
![Python](images/python-logo-only.png)

image source: [Python Software Foundation](https://www.python.org/community/logos/)
:::

## SLIDE
::::

- DENOTE MAJOR SECTIONS WITH `# TITLE` (eg `# Installation`)
- ADD INDIVIDUAL SLIDES WITH `##` (eg `## rustup on Linux/macOS`)
- KEEP THEM RELATIVELY SLIDE-LIKE; THESE ARE NOTES, NOT THE BOOK ITSELF.

## SLIDE

# SLIDE SECTION

## SLIDE

## SLIDE
83 changes: 69 additions & 14 deletions slides/02_statistical-prediction-and-supervised-learning.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,82 @@ title: "2. Statistical Prediction and Supervised Learning"

# Learning objectives

::: nonincremental
- THESE ARE NICE TO HAVE BUT NOT ABSOLUTELY NECESSARY
:::: {.columns}

::: {.column width="30%"}
Review statistics terms

Discuss machine learning ideas
:::

::: {.column width="10%"}

:::

::: notes
- You can add notes on each slide with blocks like this!
- Load a deck in the browser and type "s" to see these notes.
::: {.column width="60%"}
![Machine Learning](images/machine_learning_web.png)

image source: [Sankalp Salve](https://medium.com/@xsankalp13/advanced-topics-in-machine-learning-e55d8b0dc7f9)
:::

::::

# Statistics and Probability

[![Random Variables](images/random_variables_3Blue1Brown.png)](https://www.youtube.com/watch?v=zeJD6dqJ5lo)

# Machine Learning

## Regression vs Classification

![Regression or Classification](images/regression-vs-classification_simple-comparison-image_v3.png)

image source: [Sharp Sight Labs](https://www.sharpsightlabs.com/blog/regression-vs-classification/)

## Supervised Learning vs Unsupervised Learning

![Supervised or Unsupervised](images/Supervised-learning-and-unsupervised-learning-Supervised-learning-uses-annotation.png)

image source: [Ma Yan, et al](https://www.researchgate.net/figure/Supervised-learning-and-unsupervised-learning-Supervised-learning-uses-annotation_fig1_329533120)

## Regularization

::: incremental

* Loss function $$L(\vec{\beta}) = \text{argmin}_{\vec{\beta}} \sum_{i=1}^{N} \left(y_{i} - \beta_{0} - \sum_{j=1}^{k} \beta_{j}x_{ij}\right)^{2}$$

* L1 Regularization $$L(\vec{\beta}, \lambda) = \text{argmin}_{\vec{\beta}} \left[\sum_{i=1}^{N} \left(y_{i} - \beta_{0} - \sum_{j=1}^{k} \beta_{j}x_{ij}\right)^{2} + \lambda\sum_{j=i}^{k}|\beta_{j}|\right]$$

* L2 Regularization $$L(\vec{\beta}, \lambda) = \text{argmin}_{\vec{\beta}} \left[\sum_{i=1}^{N} \left(y_{i} - \beta_{0} - \sum_{j=1}^{k} \beta_{j}x_{ij}\right)^{2} + \lambda\sum_{j=i}^{k}\beta_{j}^{2}\right]$$

:::

# SLIDE SECTION
## Empirical Risk Minimization

We can approximate the *expected risk* over a loss function, data set, and hypothesis model $h$

$$\text{E}\left[L((\vec{x}, \vec{y}), h)\right]$$
by taking the average over the training data

$$\frac{1}{n}\displaystyle\sum_{i=1}^{n} L((x_{i}, y_{i}), h)$$
* formulas outlined by [Professor Alexander Jung](https://www.youtube.com/watch?v=8fsJCyBOizQ)

## Bias-Variance Tradeoff

Within a *hypothesis class* of similar modeling functions, we are concerned with the **bias-variance tradeoff** in model selection.

![bias-variance tradeoff](images/biasvariance.png)

image source: [Scott Fortmann-Roe ](http://scott.fortmann-roe.com/docs/BiasVariance.html)


## SLIDE
## Linear Foundations

- DENOTE MAJOR SECTIONS WITH `# TITLE` (eg `# Installation`)
- ADD INDIVIDUAL SLIDES WITH `##` (eg `## rustup on Linux/macOS`)
- KEEP THEM RELATIVELY SLIDE-LIKE; THESE ARE NOTES, NOT THE BOOK ITSELF.
"For more complex and high-dimensional problems with potential nonlinear dependencies between features, it’s often useful to ask:

## SLIDE
* What’s a linear model for the problem?
* Why does the linear model fail?
* What’s the best way to add nonlinearity, given the semantic structure of the problem?

# SLIDE SECTION

## SLIDE

## SLIDE
69 changes: 55 additions & 14 deletions slides/03_time-series-analysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,67 @@ title: "3. Time-Series Analysis"
# Learning objectives

::: nonincremental
- THESE ARE NICE TO HAVE BUT NOT ABSOLUTELY NECESSARY
- Mention time series
:::

::: notes
- You can add notes on each slide with blocks like this!
- Load a deck in the browser and type "s" to see these notes.
:::
## Package Libraries

```{r}
#| message: false
#| warning: false
library("DiagrammeR")
```


## Stepping Forward

```{r}
#| echo: false
#| eval: true
DiagrammeR::mermaid("
graph LR
TS[time<br />series]
ARIMA[autoregressive<br />models]
TIS[time<br />invariant<br />systems]
CT[control<br />theory]
NSSM[neural<br />state space<br />models]
TS --> ARIMA
ARIMA --> diffusion
ARIMA --> LLMs
# SLIDE SECTION
diffusion --> SDEs
diffusion --> NSSM
TIS --> NSSM
CT --> NSSM
")
```

## SLIDE
## Mermaid code

- DENOTE MAJOR SECTIONS WITH `# TITLE` (eg `# Installation`)
- ADD INDIVIDUAL SLIDES WITH `##` (eg `## rustup on Linux/macOS`)
- KEEP THEM RELATIVELY SLIDE-LIKE; THESE ARE NOTES, NOT THE BOOK ITSELF.
```{r}
#| echo: true
#| eval: false
DiagrammeR::mermaid("
graph LR
## SLIDE
TS[time<br />series]
ARIMA[autoregressive<br />models]
TIS[time<br />invariant<br />systems]
CT[control<br />theory]
NSSM[neural<br />state space<br />models]
# SLIDE SECTION
TS --> ARIMA
## SLIDE
ARIMA --> diffusion
ARIMA --> LLMs
## SLIDE
diffusion --> SDEs
diffusion --> NSSM
TIS --> NSSM
CT --> NSSM
")
```
2 changes: 1 addition & 1 deletion slides/_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ format:
footer: <a href="/" target="genai_club-index">DSLC.io/genai</a> | <a href="https://DSLC.io" target="_blank">DSLC.io</a>
link-external-newwindow: true
transition: slide
incremental: true
incremental: false
execute:
eval: false
echo: true
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/ai_landscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/biasvariance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/gen_ai_splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/machine_learning_web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/python-logo-only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/images/random_variables_3Blue1Brown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0c62b2

Please sign in to comment.