Publications by Travis Compton

Visualization Examples using Plotly and Highcharter.

29.01.2021

The objective of this is to display visualizations using plotly and highcharter. Ex.1 Use mpg data set from ggplot2 to create a static visualization and then use ggplotly() to create a limited interactive plot. data('mpg', package = "ggplot2") wf <- ggplot(mpg, aes(x = cty, y = hwy, color = class ))+ geom_point(aes(size = clas...

1016 sym R (1542 sym/12 pcs)

Examples of use in ggplot

29.01.2021

In this exercise, you will use diamonds data set from ggplot2 package. It is automatically loaded when you execute library(ggplot2) so you don’t have to separately load it. Please create a duplicate of diamonds and use that for homework. This will avoid corrupting the original data set. Make sure that you understand the variables in the data by...

1392 sym R (2673 sym/10 pcs) 9 img

Descriptive Statistics & One and two sample inferential tests

29.01.2021

Exercise 1 (a) When looking at the box-plot for MPG_Combo it looks relatively bell-shaped so it’s safe to assume that fuel efficiency is symmetric, so relatively equal. What we can also see is that their are a few smaller outliers, and even more larger outliers within the data. Exercise 1 (b) The most obviously difference when examining the ...

5207 sym R (1940 sym/12 pcs) 8 img

Simple and Multiple Linear Regression

29.01.2021

## 'data.frame': 3134 obs. of 4 variables: ## $ Weight : int 132 158 156 131 136 194 179 151 174 155 ... ## $ Diastolic : int 90 80 76 92 80 68 76 68 90 90 ... ## $ Systolic : int 170 128 110 176 112 132 128 108 142 130 ... ## $ Cholesterol: int 250 242 281 196 196 211 225 221 188 292 ... Exercise 1: (a) Looking at Cook�...

4133 sym R (9248 sym/15 pcs) 6 img

One-Way and Multi-Way Anova Modeling

29.01.2021

## 'data.frame': 541 obs. of 2 variables: ## $ Cholesterol: int 221 188 292 319 205 247 202 150 228 280 ... ## $ BP_Status : chr "Optimal" "High" "High" "Normal" ... Exercise 1 (a) After conducting the ANOVA test we use the Levene Test to compare the variance between the two groups. After running the Levene test we yield a p-value =...

2887 sym R (2666 sym/8 pcs)

Logistic Regression

29.01.2021

## 'data.frame': 558 obs. of 10 variables: ## $ Age : int 65 62 62 58 72 46 26 29 55 57 ... ## $ Gender : chr "Female" "Male" "Male" "Male" ... ## $ TB : num 0.7 10.9 7.3 1 3.9 1.8 0.9 0.9 0.7 0.6 ... ## $ DB : num 0.1 5.5 4.1 0.4 2 0.7 0.2 0.3 0.2 0.1 ... ## $ Alkphos : int 187 699 490 182 19...

4723 sym R (16016 sym/25 pcs) 4 img

Assignment 3

25.02.2021

10 a Looking at our plot of weekly we don’t see any significant linear relationships. We’re given a bunch of quantitative variables with only one factor variable being Direction. Looking specfically at the direction variable that over the time of this data we have more instances of up, rather than down, but they figures are still fairly clos...

3252 sym R (28813 sym/87 pcs) 8 img

Assignment 2

19.02.2021

The KNN classifier is used when dealing with qualitative problems, while KNN regression methods is used with quantitative problems. pairs(Auto) cor(Auto[1:8]) ## mpg cylinders displacement horsepower weight ## mpg 1.0000000 -0.7776175 -0.8051269 -0.7784268 -0.8322442 ## cylinders -0.7776175 1.0000000 ...

2226 sym R (7942 sym/34 pcs) 4 img

Assignment 5

25.03.2021

For parts (a) through (c), indicate which of i. through iv. is correct. Justify your answer. Less flexible and hence will give improved prediction accuracy when its increase in bias is less than its decrease in variance. Lasso limits the number of predictors, thus it reduces the inherent variance at the cost of an increase in bias Repeat (a) fo...

4182 sym R (10321 sym/66 pcs)

Assignment 4

10.03.2021

3(a). Explain how k-fold cross-validation is implemented. With k-fold cross-validation you first divide the data into different K parts. The first fold is then treated as a validation set with the remaining methods being fit onto the folds. MSE is then computed from the held out fold. This is repeated k number of times with a different group used...

4406 sym R (10594 sym/58 pcs)