Problem Sets


Problem Set 4

Instructions

  1. Posted on Slack under #general
  2. Individual PS04.ipynb files
    1. Complete PS04.ipynb by Thu 12/7 class time
    2. Due Tue 12/12 9:25am on Moodle
  3. In-class on Thu 12/7: “Think, Pair, Share” exercise

Clarifications:

In-Class Presentations

  1. If you can’t make it to lecture, it is your responsibility to send a screencast recording of you narrating your work by the end of the day.
  2. Groups still made at random, presenters still chosen at random
  3. No need to merge two files, you can select only one person’s and modify it (if at all)
  4. Rate your peer’s preparation using this Google Form
  5. Answer the sli.do poll here
library(tidyverse)
read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_frac(1) %>% 
  mutate(team = rep(1:9, length = 17)) %>% 
  arrange(team)

read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_n(2)

*** = presented

   Last           First       team
   <chr>          <chr>      <int>
 1 O'Meara        Abbey          1
 2 Martin         Teddy          1
 3 Yang           Christy        2
 4 An             Rachael        2
 5 Khan           Nubraz         3
 6 Pu             Betty          3
 7 Ding           Jenny          4
 8 Kogalovski     Aleksandra     4
 9 Xu             Xiaoman        5
10 Qiu            Chi            5
11 Knecht         Beata          6 ***
12 Huang          Juniper        6 ***
13 Tha Ra Wun     Tint           7 ***
14 Murray         Kiera          7 ***
15 Basnet Chettri Charavee       8
16 Slosser        Tillie         8

Example Solutions

  1. Presentations:
    1. Tint solutions
    2. Kiera solutions showing a “done is better than perfect” forecast error interval
    3. .zip file of both here
  2. Prof Kim’s solution.

Problem Set 3

MVP

Instructions

  1. Posted on Slack under #general
  2. Individual PS03.ipynb files
    1. Complete PS03.ipynb by Tue 11/14 class time
    2. Due Thu 11/16 9:25am on Moodle
  3. In-class on Tue 11/14: “Think, Pair, Share” exercise

Clarifications:

In-Class Presentations

  1. Groups still made at random, presenters still chosen at random
  2. No need to merge two files, you can select only one person’s and modify it (if at all)
  3. Reminder: submission due on Moodle before next class
  4. Answer the sli.do poll here
  5. Rate your peer’s preparation using this Google Form
library(tidyverse)
read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_frac(1) %>% 
  mutate(team = rep(1:9, length = 17)) %>% 
  arrange(team)

read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_n(2)

*** = presented

Basnet Chettri Charavee       1 ***
An             Rachael        1 ***
Slosser        Tillie         2
O'Meara        Abbey          2
Huang          Juniper        3 ***
Murray         Kiera          3 ***
Tha Ra Wun     Tint           4  
Yang           Christy        4
Xu             Xiaoman        5
Pu             Betty          5
Knecht         Beata          6
Qiu            Chi            6
Martin         Teddy          X1
Kogalovski     Aleksandra     X1
Ding           Jenny          X2
Anesko         Greta          X2
Khan           Nubraz         X3

Example Solutions

  1. Presentations:
    1. Charavee + Rachel solutions
    2. Kiera + Juniper solutions
    3. .zip file of both here
  2. Prof Kim’s solution. Note a couple of things I did have time to address b/c of my conference last week:
    1. I didn’t polish my graphs. (An example of bad role modeling on my part: “Do as I say, not do as I do.” Apologies)
    2. I realized I calculated the seasonal naive forecast wrong! Where as you were supposed to using only the prior year’s worth of seasons (i.e. 4 time points each corresponding to the last four quarters), I computed the average for all past quarters! i.e. all springs, all summers, etc. And thus my solution was more complicated than necessary.

Problem Set 2

  1. Slides on PS02 data’s context. Prof Kim quote: “Numbers are numbers, but data has context”
  2. My thoughts about ChatGPT. It is a very powerful tool, but you need to be:
    1. Knowledgeable enough to understand the code
    2. Experienced enough in your domain and programming to know what to prompt
    3. Disciplined enough to sanity check your results

Instructions

  1. Posted on Slack under #general
  2. Individual PS02.ipynb files
    1. Complete PS02.ipynb by Tue 10/24 class time
    2. Due Thu 10/26 9:25am on Moodle
  3. In-class on Tue 10/24: “Think, Pair, Share” exercise

Clarifications:

  1. Use the dbh variable, not the dbh_orig variable.
  2. D’oh! Say you do 5 queries on ChatGPT and then get the share URL link. Now saw you do a 6th query. The share URL does NOT reflect this 6th search. So you will need to get the share URL link AFTER you’re done your PS02.

In-Class Presentations

  1. Groups still made at random, presenters still chosen at random
  2. No need to merge two files, you can select only one person’s and modify it (if at all)
  3. Reminder: submission due on Moodle before next class
  4. Answer the sli.do poll here
  5. Rate your peer’s preparation using this Google Form
library(tidyverse)
read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_frac(1) %>% 
  mutate(team = rep(1:9, length = 17)) %>% 
  arrange(team)

read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_n(2)

*** = presented

 1 Xu             Xiaoman        1
 2 An             Rachael        1
 3 Pu             Betty          2 ***
 4 Qiu            Chi            2 ***
 5 Tha Ra Wun     Tint           3
 6 Martin         Teddy          3
 7 Knecht         Beata          4
 8 Murray         Kiera          4
 9 O'Meara        Abbey          5 ***
10 Yang           Christy        5 ***
11 Basnet Chettri Charavee       6
12 Huang          Juniper        6
13 Ding           Jenny          7
14 Slosser        Tillie         7
15 Kogalovski     Aleksandra     8
16 Anesko         Greta          8

Example Solutions

  1. Presentations:
    1. Betty + Chi solutions
    2. Abbey + Christy solutions
    3. .zip file of both here
  2. Prof Kim’s solution

Problem Set 1

Instructions

  1. Posted on Slack under #general
  2. Individual PS01.ipynb files
    1. Due Thu 10/5 9:25am on moodle (see Moodle link on top right of page)
    2. Submit both a PS01.ipynb where all code is reproducible and a .csv file of your data
  3. In-class on Thu 10/5: “Think, Pair, Share” exercise
    1. I will randomly create teams of pairs. Any remaining odd number student will be paired with me.
    2. You will show each other your code and prepare a single mini-presentation .ipynb
    3. I will pick 2-3 pairs at random to present their work in front of the class
    4. You will rate your peer’s preparation using this Google Form

Clarifications added afterwards:

  1. Dataset should be at least 100 rows
  2. For mini-presentation, you will have to choose one of the two datasets
  3. Do problem set in python

In-Class Presentations

  1. I will make groups at random using code below. I will join a group if there is an odd person left out.
  2. Work together for 20 minutes to come up with single .ipynb
  3. I will pick two teams at random to present to the class
  4. I will present my work to the class. click here
  5. Answer the sli.do poll here
  6. Rate your peer’s preparation using this Google Form Code to generate groups:
library(tidyverse)
read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_frac(1) %>% 
  mutate(team = rep(1:9, length = 17)) %>% 
  arrange(team)

read_csv("390.csv") %>% 
  filter(First != "Albert") %>% 
  sample_n(2)

*** = presented

 1 Yang           Christy        1
 2 O'Meara        Abbey          1
 3 Slosser        Tillie         2 ***
 4 Murray         Kiera          2 ***
 5 Khan           Nubraz         3
 6 Ding           Jenny          3
 7 Anesko         Greta          4
 8 Martin         Teddy          4
 9 Xu             Xiaoman        5
10 An             Rachael        5
11 Kogalovski     Aleksandra     6
12 Qiu            Chi            6
13 Knecht         Beata          7 ***
14 Basnet Chettri Charavee       7 ***
15 Tha Ra Wun     Tint           8
16 Huang          Juniper        8
17 Pu             Betty          9

Example Solutions

  1. Presentations:
    1. Tillie + Kiera solutions
    2. Beata + Charavee solutions
    3. .zip file of both here
  2. Prof Kim’s solution