Publications by Jacob Martin

DS 2870: Module 3 - Reordering groups in GGplot using the forcats package

21.05.2024

Set Up Your Project and Load Libraries ## Set the default size of figures and default to printing the R code knitr::opts_chunk$set(fig.align = "center", echo = F, include = T) ## Load the libraries we will be using pacman::p_load(tidyverse, skimr) ## Changing the default theme to black/white ins...

1750 sym 8 img

DS 1870: Homework 7 Key - Spring 2024

04.05.2024

knitr::opts_chunk$set(echo = TRUE, message = F, warning = F, fig.align = "center") # load packages: typical - tidyverse and skimr # Classification - caret, rpart, rpart.plot pacman::p_load(tidyverse, skimr, caret, rpart, rpart.plot) # Setting the default theme...

2469 sym Python (3812 sym/11 pcs) 2 img

DS 2870: Homework 9 - Spring 2024 - Key

01.05.2024

knitr::opts_chunk$set(echo = TRUE, message = F, warning = F, fig.align = "center") # load packages: typical - tidyverse and skimr # Classification - class, caret, rpart, rpart.plot pacman::p_load(tidyverse, skimr, class, caret, rpart, rpart.plot) theme_set(them...

4533 sym Python (10688 sym/25 pcs) 3 img

DS 2870: Homework 8 - Sp 2024 - key

30.04.2024

Data Description: ESPN has a metric it uses to judge quarterback (QB) performance called Quarterback Rating, QBR, and how it is calculated is kept a secret. The qbr game stats.csv file has the QBR rating and game statistics for all quarterback and game performances. The columns in the qbr_df data set are: response variable - qbr: The quarterback...

3626 sym Python (5441 sym/14 pcs) 4 img

DS 1870: Module 6 Homework - Spring 2024 - Key

30.04.2024

Data description ESPN has a metric it uses to judge a quarterback’s (QB) performance called Quarterback Rating (QBR), and how it is calculated is kept a secret. The qbr data.csv file has the QBR rating and game statistics for all quarterback and game performances. The columns in the csv file are: qbr (response variable): The quarterback ratin...

4123 sym 3 img

STAT 5230: Chapter 13 - Factor analysis ML Method - Bones Example

30.04.2024

knitr::opts_chunk$set(echo = TRUE, warning = F, message = F, fig.align = "center") options(digits=3) # Loading packages: tidyverse & moderndive pacman::p_load(tidyverse, corrplot, psych, MVN, GGally, ggrepel) # Changing the default theme to theme_bw() theme_set(theme_classi...

2288 sym Python (11770 sym/31 pcs) 5 img

STAT 5230: Chapter 13 - Factor analysis - Bones Example

25.04.2024

Calculating the mahalanobis distance to look for outliers data.frame( x = 1:nrow(bones), y = mahalanobis(bones, center = colMeans(bones), cov = var(bones)) ) |> ggplot( mapping = aes(x = x, y = y) ) + geom_col() + geom_hline( yintercept = qchisq((nrow(bones)-0.5)/nrow(bones), df = p), color = "red" ...

2420 sym Python (7773 sym/27 pcs) 16 img 1 tbl

STAT 5230: Chapter 9 Lab - Solutions

23.04.2024

knitr::opts_chunk$set(echo = TRUE, fig.width=10, fig.height=6, fig.align = "center") # Load the needed package(s) below: pacman::p_load(readxl, tidyverse, skimr, caret, GGally, class, rpart, rpart.plot) # Change the default theme below: theme_set(theme_clas...

3289 sym 4 img 4 tbl

DS 1870: Homework 5.2 Solutions - Spring 2024

17.04.2024

Data description ESPN has a metric it uses to judge a quarterback’s (QB) performance called Quarterback Rating (QBR), and how it is calculated is kept a secret. The qbr data.csv file has the QBR rating and game statistics for all quarterback and game performances. The columns in the csv file are: qbr (response variable): The quarterback ratin...

3668 sym 5 img

DS 1870: Homework 4.2 Solutions - Spring 2024

17.04.2024

Question 1 Blackjack is a card game where the player goes up against the dealer (not other players). A round of blackjack can end in one of three ways: “player” wins, “dealer” wins, or a “push” (tie). The goal of blackjack is to try to get as close of a point total of 21 as possible without going over (called a bust). If the player i...

6352 sym Python (5603 sym/12 pcs) 2 img