Publications by June Yao
Assignment
Assignment_Week01 2 File I/O 3 Numerical summary 4 Graphical summary 5 Write Data to File APP. Student Info June Yao 2020-08-27 2 File I/O 2.1 Read cereal=read.csv("Cereal.csv") 2.2 Data frames head(cereal) ## name mfr type calories protein fat sodium fiber carbo ## 1 100%_Bran N C 70 ...
743 sym R (5859 sym/54 pcs) 2 img
Assignment
Libraries to load load data: full.data <- read.csv("skin-cancer.csv", header = TRUE) head(full.data) ## Mort Lat ## 1 219 33.0 ## 2 160 34.5 ## 3 170 35.0 ## 4 182 37.5 ## 5 149 39.0 ## 6 159 41.8 dim(full.data) ## [1] 49 2 1 Simple regression with and without missingness 1.1 Standard Simple regression without missingness ca...
1654 sym R (7078 sym/15 pcs) 1 img
Assignment
Assignment_week05_June Yao_500316995 Libraries to load 1 IDA Pima Indians Diabetes data 2 Logistic Regression 3 Classifier comparisons 4 Visualize the boundaries created by the classifiers APP. Student Info June Yao 2020-09-26 Libraries to load library(ggplot2) library(tidyverse) library(mlbench) library(gridExtra) library(grid) library...
1598 sym R (8188 sym/24 pcs) 5 img
Assignment
Assignment_week04_June Yao_500316995 1 Movie ratings data 2 Author by word count 3 Shiny app to allow the user to explore and decide APP. Student Info June Yao 2020-09-20 1 Movie ratings data 1.1 Data processing[optional] library(dplyr) library(tidyr) ratings <- read.csv("ml-latest-small/ratings.csv", header = TRUE) movies <- read.csv("...
2207 sym R (6800 sym/26 pcs) 16 img
Assignment
Assignment_week03_June Yao_500316995 1 Parametric density estimation 2 Parametrics and Nonparametric density estimation 3 Bandwidth selection APP. Student Info June Yao 2020-09-13 1 Parametric density estimation 1.1 Basic Gaussian simulation normal.data <- rnorm(100, mean = 10, sd = 10) hist(normal.data) 1.2 Reproducible RNG par(mfrow=c(1...
842 sym R (2981 sym/15 pcs) 9 img
Assignment
Assignment_week06_June Yao_500316995 Libraries to load 1 Construct a 10-fold repeated cross validation 2 Extend to write your own repeated cross validation APP. Student Info June Yao 2020-10-06 Libraries to load library(ggplot2) library(mlbench) library(caret) library(MASS) library(class) library(pROC) library(plotly) load data: data(S...
1470 sym R (6895 sym/8 pcs)
Assignment
Libraries to load load data: data(Hitters, package = "ISLR") Hitters <- na.omit(Hitters) head(Hitters) ## AtBat Hits HmRun Runs RBI Walks Years CAtBat CHits CHmRun ## -Alan Ashby 315 81 7 24 38 39 14 3449 835 69 ## -Alvin Davis 479 130 18 66 72 76 3 1624 457 63 #...
1795 sym R (6516 sym/15 pcs) 4 img
Assignment
Libraries to load 1 Compute chance of a coin flip 1.1 Simulate some data set.seed(5003) theta = 0.7 # P(Head) N = 200 # simulate some coin flips coin.flips <- rbinom(n = N, size = 1, prob = theta) 1.2 Determine how to compute the Likelihood of the parameter likelihood <- function(theta, x) prod(dbinom(x, size = 1, prob = theta, log = TRUE...
828 sym R (3880 sym/12 pcs) 5 img
Assignment
Libraries to load 1 Load Data wine <- read.csv("winequality-data.csv", header = TRUE) # Hitters <- na.omit(Hitters) wine <- wine[, -13] head(wine) ## fixed.acidity volatile.acidity citric.acid residual.sugar chlorides ## 1 6.7 0.15 0.38 1.7 0.037 ## 2 6.7 0.44 0.31 ...
1302 sym R (15708 sym/22 pcs) 10 img
Assignment
Libraries to load 1 Evaluate an integral produce a plot of 5 different sigmas: fx <- function(x) { x^3 * sin((x + 3.4)/2) } # using the Monte Carlo integration method n = 10000 x1 <- runif(n, min = 0, max = 3) sx <- fx(x1) ans.mc <- mean(sx * 3) ans.mc ## [1] 4.684397 # using the integrate() function in R Fx <- integrate(fx, lowe...
824 sym R (3715 sym/8 pcs) 2 img