Session | Date | Area | Level |
---|---|---|---|
Hacker Stats (AKA Resampling Methods) | 14:00-15:00 Wed 14th August 2024 | R | |
Flexdashboard | 13:00-14:30 Thu 15th August 2024 | R | |
Excel first steps | 09:30-10:30 Tue 3rd September 2024 | Excel |
09/08/2024
Session | Date | Area | Level |
---|---|---|---|
Hacker Stats (AKA Resampling Methods) | 14:00-15:00 Wed 14th August 2024 | R | |
Flexdashboard | 13:00-14:30 Thu 15th August 2024 | R | |
Excel first steps | 09:30-10:30 Tue 3rd September 2024 | Excel |
Here’s a simple representation of a node, implemented in code, that we might find in a neural network:
Here are some example input:output pairs for our node:
NOT
A more complex feed-forward neural network
V10 | V11 | V12 | V13 | V14 | V15 | V16 | V17 | V18 | V19 | V20 |
---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 3 | 18 | 18 | 18 | 126 | 136 | 175 | 26 |
36 | 94 | 154 | 170 | 253 | 253 | 253 | 253 | 253 | 225 | 172 |
253 | 253 | 253 | 253 | 253 | 253 | 253 | 253 | 251 | 93 | 82 |
253 | 253 | 253 | 253 | 253 | 198 | 182 | 247 | 241 | 0 | 0 |
156 | 107 | 253 | 253 | 205 | 11 | 0 | 43 | 154 | 0 | 0 |
An aside here for the R enthusiasts - we can plot the handwritten numbers back out of the data using ggplot()
:
mnist_plot_dat <- function(df) {
# matrix to pivoted tibble for plotting
df |>
as_tibble() |>
mutate(rn = row_number()) |>
pivot_longer(!rn) |>
mutate(name = as.numeric(gsub("V", "", name)))
}
mnist_main_plot <- function(df) {
df |>
ggplot() +
geom_tile(aes(
x = rn,
y = reorder(name,-name),
fill = value
)) +
scale_fill_gradient2(mid = "white", high = "black")
}
mnist_plot <- function(n){
mnist_plot_dat(matrix(mnist$train$images[n, ], 28, 28)) |>
mnist_main_plot() +
ggtitle(glue("Label: { mnist$train$labels[n]}")) +
theme_void() +
theme(legend.position = "none")
# matrix(mnist$train$images[n, ], 28, 28) |>
# as_tibble() |>
# mutate(rn = row_number()) |>
# pivot_longer(!rn) |>
# mutate(name = as.numeric(gsub("V", "", name))) |>
# ggplot() +
# geom_tile(aes(
# x = rn,
# y = reorder(name,-name),
# fill = value
# )) +
# scale_fill_gradient2(mid = "white", high = "black") +
# ggtitle(glue("Label: { mnist$train$labels[n]}")) +
# theme_void() +
# theme(legend.position = "none")
}
#mnist_plot_dat(matrix(mnist$train$images[1:36, ], 28, 28))
gridExtra::grid.arrange(grobs = map(1:36, mnist_plot), nrow = 6, top="Some MNIST examples")
Session | Date | Area | Level |
---|---|---|---|
Hacker Stats (AKA Resampling Methods) | 14:00-15:00 Wed 14th August 2024 | R | |
Flexdashboard | 13:00-14:30 Thu 15th August 2024 | R | |
Excel first steps | 09:30-10:30 Tue 3rd September 2024 | Excel |