Publications by Jacob Martin
STAT 5230: Homework 4 Solutions - 2024
knitr::opts_chunk$set(echo = TRUE, fig.align = "center", message = F, warning = F) ## Packages pacman::p_load(tidyverse, Rfast, MVN, heplots, skimr, GGally, car, rstatix) ################################################################################ theme_se...
6558 sym Python (7288 sym/24 pcs) 5 img 4 tbl
DS 2870: Homework 7 Solutions - Spring 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...
7073 sym 3 img 1 tbl
DS 2870 - Homework 5 Solutions - Spring 2024
Question 1) Conditional Bar Chart Data Description: Housing Data The homes data set has 8 variables on 1299 homes that sold in January of 2023: type: The type of property zip: the zip code of the property price: the price the home sold for bed and baths: The number of beds and baths in the home, respectively sqft: The square footage of the home...
2199 sym Python (5939 sym/7 pcs) 2 img
STAT 5230: Classification Trees - Cats
Set up knitr::opts_chunk$set(echo = TRUE, fig.align = "center") pacman::p_load(rpart, rpart.plot, tidyverse, caret) theme_set(theme_bw()) # We will use the data cats, which is in the package, MASS cats <- MASS::cats |> rename(heart_wt = Hwt, body_wt = Bwt) head(cats) ## Sex body_wt heart_wt ## 1 ...
1533 sym 4 img
STAT 5230: Classification Trees - Mushrooms
Chapter 5: Classification using Decision Trees knitr::opts_chunk$set(echo = TRUE, fig.align = "center") # Load them here: pacman::p_load(rpart, rpart.plot, tidyverse, caret) # Changing the default theme theme_set(theme_bw()) Decision Trees Example: To Eat or not to Eat? Can we determine if a mushroom is safe to eat b...
2945 sym Python (4974 sym/17 pcs) 2 img 2 tbl
DS 2870: Homework 6 Key - Spring 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
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
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
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
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