Publications by Jacob Martin

DS 2870: Homework 6 Key - Spring 2024

10.04.2024

Dice Description The dice rolling game Boreal comes with 7 dice: 4 six-sided dice (d6), 1 ten-sided die (d10), 1 twenty-sided die (d20), and 1 thirty-sided die (d30). All the dice start at 1 and increment by 1 to their max value (d6 = max 6, d30 = max 30). Question 1: Dice Rolling Function Create a function called dice_roller() that has the fo...

4048 sym Python (3828 sym/14 pcs)

STAT 5230: Chapter 9 - QDA with stars data

09.04.2024

Reading in the data: stars <- read_excel("stars.xlsx") |> dplyr::mutate( type = factor(type, levels=c("Brown Dwarf", "Red Dwarf", "White Dwarf","Main Sequence", "Supergiant", "Hypergiant"))) |> dplyr::select(-color,-class) Initial check Using skim() to ge...

2409 sym Python (15062 sym/28 pcs) 4 img 3 tbl

STAT 5230: Chapter 9 - kNN with star data

09.04.2024

Reading in the data: stars <- read_excel("stars.xlsx") |> dplyr::mutate( type = factor(type, levels=c("Brown Dwarf", "Red Dwarf", "White Dwarf","Main Sequence", "Supergiant", "Hypergiant")) ) |> mutate( across( .cols = c(lumin, radius, temp)...

1351 sym 2 img

STAT 5230: Chapter 9 - LDA for two groups

04.04.2024

Reading in the data and skimming it credit <- read_excel("credit fraud.xlsx") |> mutate(Fraud = factor(Fraud, levels = c("No", "Yes"))) #credit <- # read_csv("Credit Fraud Full.csv") |> # mutate(Fraud = factor(Fraud, # levels = c("No", "Yes"))) |> # dplyr::select(Fraud, Amount, PC1...

3975 sym Python (16194 sym/46 pcs) 8 img 3 tbl

STAT 5230: Lab 4 - Skulls Data

03.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(heplots, readxl, tidyverse, magrittr, MVN, rstatix, broom) # Change the default theme below: theme_set(theme_bw()) ...

5113 sym Python (10554 sym/30 pcs) 5 img 7 tbl

DS 1870: Homework 4.1 Solutions - Spring 2024

02.04.2024

If a question asks for any calculations (means, medians, tables, proportions, etc…) or graphs, make sure they appear in the knitted document The final document should not show any warnings Data Description The video game data set (vg) has 11 variables on over 64000 video games. The important variables are: title: the name of the game genre: ...

2207 sym Python (3741 sym/5 pcs) 1 img

DS 2870: Gradient Descent

28.03.2024

Minimizing a second level polynomial We’ll start by minimizing a simple function: \[f(x) = (x - 2)^2\] Since the whole term is squared, the minimum value of \(f(x)\) is 0, which occurs when \(x = 2\) We can also graph it: # Function to be optimized second_order_poly <- function(x){(x - 2)^2} # Creating the function for values of -5 to 5 tibbl...

7347 sym 10 img 1 tbl

STAT 5230: Chapter 8 - Discriminant Analysis for NBA data

26.03.2024

Set Up Your Project and Load Libraries knitr::opts_chunk$set(echo = TRUE) options(digits = 3) ## Load the libraries we will be using pacman::p_load(tidyverse, magrittr, GGally, MVN) ## Changing the default theme to black white theme_set(theme_bw()) theme_update( axis.title = element_text(size = 12), axis.text = element_text(size = 1...

3285 sym Python (13906 sym/55 pcs) 10 img 3 tbl

DS 1870: Module 4.2 Homework Results - Sp 24

26.03.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...

6345 sym 2 img

STAT 5230: Chapter 6 - Oney-way RCBD MANOVA

21.03.2024

Set Up Your Project and Load Libraries knitr::opts_chunk$set(echo = TRUE) options(digits = 3) ## Load the libraries we will be using pacman::p_load(tidyverse, Rfast, heplots, GGally, MVN, car, rstatix) ## Changing the default theme to black white theme_set(theme_bw()) theme_update( axis.title = element_text(size = 10),...

2529 sym Python (12015 sym/42 pcs) 1 img 3 tbl