Publications by Budkhand
HW2
library(ISLR2) names(Smarket) ## [1] "Year" "Lag1" "Lag2" "Lag3" "Lag4" "Lag5" ## [7] "Volume" "Today" "Direction" dim(Smarket) ## [1] 1250 9 summary(Smarket) ## Year Lag1 Lag2 Lag3 ## Min. :2001 Min. :-4.922000 Min. :-4.922000 Min. :-4.92...
47 sym R (6148 sym/42 pcs) 2 img
Homework_3
library(readr) library(xts) ## Loading required package: zoo ## ## Attaching package: 'zoo' ## The following objects are masked from 'package:base': ## ## as.Date, as.Date.numeric library(dplyr) ## ## ######################### Warning from 'xts' package ########################## ## # ...
30 sym R (4364 sym/27 pcs)
exercise2
chp_4.8 In the case of KNN with K=1, we have a training error rate of 0% because in this case, we have P(Y=j|X=xi)=I(yi=j) which is equal to 1 if yi=j and 0 if not. We do not make any error on the training data within this setting, that explains the 0% training error rate. However, we have an average error rate of 18% wich implies a test error rate...
530 sym
HW1_112035137
# 3.6.1 to 3.6.6. library(ISLR2) data("Boston") attach(Boston) lm.fit <- lm(medv ~ lstat, data = Boston) lm.fit ## ## Call: ## lm(formula = medv ~ lstat, data = Boston) ## ## Coefficients: ## (Intercept) lstat ## 34.55 -0.95 summary(lm.fit) ## ## Call: ## lm(formula = medv ~ lstat, data = Boston) ## ## Residuals: ## M...
58 sym R (10311 sym/45 pcs) 13 img
FinalExam_Budkhand_112035137
# Load libraries library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ ti...
19 sym R (8004 sym/15 pcs) 1 img
Inclass ex 2
library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union path_bike_orderlines <- "bike_orderlines.rds" bike_orderlines_tbl <- readRDS(path_bike_orderlines) grouped_data <- ...
9 sym R (1346 sym/6 pcs)
Publish Document
# Find the top 10 bikeshop names with the largest revenues library(ggplot2) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(readxl) bike_orderlines <- read_...
11 sym R (1121 sym/7 pcs) 1 img
midterm_112035137
# Load necessary libraries library(magrittr) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(tidyr) ## ## Attaching package: 'tidyr' ## The following objec...
26 sym R (6111 sym/23 pcs)
Midterm_112035137
Load libraries library(magrittr) library(dplyr) library(tidyr) library(tidyverse) library(lubridate) library(stringr) library(scales Import data data <- readRDS(“bike_orderlines.rds”) Question 1 path_bike_orderlines <- “bike_orderlines.rds” bike_orderlines_tbl <- readRDS(path_bike_orderlines) %>% mutate(model = case_when( model == “CAAD...
4819 sym
hw5_20231030
R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the...
8792 sym 1 img