Publications by Harold Nelson

Exercises on Tuples

13.02.2020

Exercises on Tuples Harold Nelson 2/4/2022 Tuples A tuple is a sequence of values separated by commas. A tuple may or may not be enclosed in parentheses. Here are some examples. t1 = 1,2,3 t2 = (1,2,3) print(t1) ## (1, 2, 3) print(t2) ## (1, 2, 3) Note that in both cases print() enclosed the tuples in parentheses. Problem 1: Stop the Video an...

3287 sym R (1450 sym/49 pcs)

Class Demo

12.02.2020

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

591 sym R (262 sym/2 pcs) 1 img

Get and Clean 2

07.02.2020

San Diego Let’s get the weather from San Diego to compare with Olympia. Libraries library(tidyverse) ## ── Attaching packages ───────────────────────────────────────────────────────────────────────�...

341 sym R (5584 sym/18 pcs)

Function Exercises

05.02.2020

Exercises on Functions Nelson 2/5/2020 Ex1 Create a function, quad(a,b,c,x), to evaluate a quadratic polynomial at a given value of x. The parameters of the function are, in order: a, the coefficient of the quadratic term. b, the coefficient of the linear term. c, the constant term. x, the value at which the polynomial is to be evaluated. Th...

744 sym R (563 sym/12 pcs)

Get and Clean

05.02.2020

Libraries library(tidyverse) ## ── Attaching packages ───────────────────────── tidyverse 1.3.0 ── ## ✓ ggplot2 3.2.1 ✓ purrr 0.3.3 ## ✓ tibble 2.1.3 ✓ dplyr 0.8.3 ## ✓ tidyr 1.0.2 ✓ stringr 1.4.0 ## ✓ readr 1.3.1 ✓ forcats 0.4.0 ## ── Conflicts...

1428 sym R (10213 sym/24 pcs)

List Exercise 3

04.02.2020

List Exercises 3 Harold Nelson 2/4/2020 Ex1 Append and Concatenate What is the difference between appending to a list and concatenation? Answer l1 = [1,2,3] l2 = [4,5,6] l3c = l1 + l2 print(l3c) ## [1, 2, 3, 4, 5, 6] l1.append(l2) print(l1) ## [1, 2, 3, [4, 5, 6]] The second list became a member of the first list. Ex2 Why didn’t I store t...

1274 sym R (816 sym/24 pcs)

GHCN Resources

31.01.2020

Load Libraries library(tidyverse) ## ── Attaching packages ──────────────────────────────────── tidyverse 1.2.1 ── ## ✔ ggplot2 3.2.1 ✔ purrr 0.3.3 ## ✔ tibble 2.1.3 ✔ dplyr 0.8.3 ## ✔ tidyr 1.0.0 ✔ stringr 1.4.0 ## ✔ readr 1.3.1 ...

1776 sym R (6816 sym/24 pcs)

Notes jan 22

22.01.2020

load("/cloud/project/cdc.Rdata") str(cdc) ## 'data.frame': 20000 obs. of 9 variables: ## $ genhlth : Factor w/ 5 levels "excellent","very good",..: 3 3 3 3 2 2 2 2 3 3 ... ## $ exerany : num 0 0 1 1 0 1 1 0 0 1 ... ## $ hlthplan: num 1 1 1 1 1 1 1 1 1 1 ... ## $ smoke100: num 0 1 1 0 0 0 0 0 1 0 ... ## $ height : num 70 64 60 66 61 ...

505 sym R (5307 sym/32 pcs)

Notes on Conditional Execution

21.01.2020

Conditional Execution Harold Nelson 1/23/2020 Instructions In the exercises that follow, try to predict what the python interpreter would do. Commit yourself on paper to your prediction. Then copy the code to a Jupyter notebook and run it. Each block begins with one or more logical variables of the form condn, where the n is replaced by an int...

1993 sym R (555 sym/4 pcs)

Notes CSC 530 Nov 25

26.11.2019

Hyperparameter Tuning I’ll take an example from Kuhn’s documentation on github. This uses a support vector machine with a radial kernel to distinguish between mines and rocks using sonar data. The particulars of the example are unimportant. What I’m interested in is the significance of the way that hyperparameter tuning is specified. In thi...

1427 sym R (11972 sym/54 pcs)