Skip to content

Commit

Permalink
Updated quizzes and assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Jan 29, 2025
1 parent e114cec commit e215e2d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 19 deletions.
4 changes: 2 additions & 2 deletions assignments/A1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Assignment 1
---

This assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.
This assignment will use the same data that you will use in the [retail project](Project.qmd) later in the semester. Each student will use a different time series, selected using their student ID number as follows.

```r
library(fpp3)
Expand All @@ -26,7 +26,7 @@ retail <- get_my_data(12345678)

For all plots, please use appropriate axis labels and titles.

You need to submit one Quarto (`qmd`) file which implements all steps above.
You need to submit one Quarto (`qmd`) file which implements all steps above. You may use <a href="https://af.numbat.space/assignments/Assignment_template.qmd">this file</a> as a starting point.

To receive full marks, the `qmd` file must compile without errors.

Expand Down
4 changes: 2 additions & 2 deletions assignments/A2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Assignment 2
---

This assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.
This assignment will use the same data that you will use in the [retail project](Project.qmd) later in the semester. Each student will use a different time series, selected using their student ID number as follows.

```r
library(fpp3)
Expand All @@ -23,7 +23,7 @@ retail <- get_my_data(12345678)
3. Now use time-series cross-validation with a minimum sample size of 15 years, a step size of 1 year, and a forecast horizon of 5 years. Calculate the RMSE of the results. Does it change the conclusion you reach based on the test set?
4. Which of these two methods of evaluating accuracy is more reliable? Why?

Submit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above.
Submit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above. You may use <a href="https://af.numbat.space/assignments/Assignment_template.qmd">this file</a> as a starting point.

To receive full marks, the `qmd` file must compile without errors.

Expand Down
5 changes: 2 additions & 3 deletions assignments/A3.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Assignment 3
---

This assignment will use the same data that you will use in the [retail project](Project.qmd) later in semester. Each student will use a different time series, selected using their student ID number as follows.
This assignment will use the same data that you will use in the [retail project](Project.qmd) later in the semester. Each student will use a different time series, selected using their student ID number as follows.

```r
library(fpp3)
Expand All @@ -26,8 +26,7 @@ Use a training set up to and including 2018.
* Which model is best based on AIC? Which model is best based on the test set RMSE? Which do you think is best to use for future forecasts? Why?
* Check the residuals from your preferred model, using an ACF plot and a Ljung-Box test. Do the residuals appear to be white noise?

Submit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above.

Submit a Quarto (`qmd`) file which carries out the above analysis. You need to submit one file which implements all steps above. You may use <a href="https://af.numbat.space/assignments/Assignment_template.qmd">this file</a> as a starting point.

```{r}
#| output: asis
Expand Down
23 changes: 23 additions & 0 deletions assignments/Assignment_template.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: "Title of your assignment"
author: Your Name
student_id: 123456789 # Your student ID
format: html
execute:
echo: true
---

```{r}
#| label: get-data
#| message: false
library(fpp3)
get_my_data <- function(student_id) {
set.seed(student_id)
all_data <- readr::read_rds("https://bit.ly/monashretaildata")
while(TRUE) {
retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))
if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)
}
}
retail <- get_my_data(rmarkdown::metadata$student_id)
```
4 changes: 2 additions & 2 deletions course_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ quizzes <- read_csv(here::here("quizzes.csv")) |>
mutate(
Date = lastmon(QDue),
QMoodle = paste0(
"https://learning.monash.edu/mod/",
c("quiz", rep("assign", 4)), "/view.php?id=", QMoodle
"https://learning.monash.edu/mod/quiz/view.php?id=",
QMoodle
)
)

Expand Down
20 changes: 10 additions & 10 deletions quizzes.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Quiz, QDue, QMoodle
Week 2, 2025-03-14, 0000000
Week 3, 2025-03-21, 0000000
Week 4, 2025-03-28, 0000000
Week 5, 2025-04-04, 0000000
Week 6, 2025-04-11, 0000000
Week 7, 2025-04-18, 0000000
Week 8, 2025-05-02, 0000000
Week 9, 2025-05-09, 0000000
Week 10, 2025-05-16, 0000000
Week 11, 2025-05-23, 0000000
Week 2, 2025-03-16, 3868353
Week 3, 2025-03-23, 3868355
Week 4, 2025-03-30, 3868369
Week 5, 2025-04-06, 3868370
Week 6, 2025-04-13, 3868371
Week 7, 2025-04-20, 3868372
Week 8, 2025-05-04, 3868373
Week 9, 2025-05-11, 3868374
Week 10, 2025-05-18, 3868375
Week 11, 2025-05-25, 3868376

0 comments on commit e215e2d

Please sign in to comment.