Looking at the decision boundary a classifier generates can give us some geometric intuition about the decision rule a classifier uses and how this decision rule changes as the classifier is trained on more data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(dplyr) | |
library(gganimate) | |
heartdf = tibble( | |
t = seq(0, 2*pi, pi/60), | |
x = 16*sin(t)^3, | |
y = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# learn from https://rpubs.com/dgrtwo/valentine | |
library(ggplot2) | |
library(dplyr) | |
library(gganimate) | |
heartdf <- tibble( | |
t = seq(0, 2 * pi, pi / 60), | |
x = 16 * sin(t)^3, | |
y = 13 * cos(t) - 5 * cos(2 * t) - 2 * cos(3 * t) - cos(4 * t) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "gganimate cookbook code" | |
output: | |
html_document: | |
df_print: tibble | |
highlight: kate | |
css: gganimate_cookbook.css | |
--- | |
```{r setup} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(brms) | |
library(tidybayes) | |
library(gganimate) | |
library(magick) | |
tb <- tibble( | |
index = 1:15, | |
a = runif(n = 15, min = 0, max = 2), | |
b = rnorm(15, mean = 2 * a, sd = 1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
# Download Fira Sans Condensed from | |
# https://fonts.google.com/specimen/Fira+Sans+Condensed | |
high_mean <- 12 | |
high_sd <- 4 | |
flat_mean <- 35 | |
flat_sd <- 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "ggplot2 examples and exercises" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` | |
This document contains all the code that is displayed during the workshop. The |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(scales) | |
library(broom) | |
library(gganimate) | |
# Original by David Robinson at http://varianceexplained.org/files/loess.html | |
# Basic static plot ------------------------------------------------------- |
OlderNewer