diff --git a/GP.qmd b/GP.qmd index 2dc8dea..8947100 100644 --- a/GP.qmd +++ b/GP.qmd @@ -212,6 +212,7 @@ Y_n \\ \end{aligned} \end{equation} ``` + ## Hyper Parameters . . . @@ -222,11 +223,9 @@ One of the most common kernels which we will focus on is the squared exponential $$C_n = \exp{ \left( -\frac{\vert\vert x - x' \vert \vert ^2}{\theta} \right ) + g \mathbb{I_n}} $$ -. . . - -Recall, $$\Sigma_n = \tau^2 C_n$$ - -We have three main parameters here: +. . . + +Recall, $\Sigma_n = \tau^2 C_n$. We have three main parameters here: - $\tau^2$: Scale @@ -417,7 +416,7 @@ Here, $\theta$ = ($\theta_1$, $\theta_2$, ..., $\theta_m$) is a vector of length . . . -- Heteroskedasticity implies that the data is noisy, and thee noise is irregular. +- Heteroskedasticity implies that the data is noisy, and the noise is irregular. ```{r hetviz, echo = FALSE, cache=F, warning=FALSE, message=FALSE, dev.args = list(bg = 'transparent'), fig.width= 6, fig.height= 4, fig.align="center", warn.conflicts = FALSE} diff --git a/GP_Notes.qmd b/GP_Notes.qmd index aeb1ce7..109ef4c 100644 --- a/GP_Notes.qmd +++ b/GP_Notes.qmd @@ -120,7 +120,7 @@ $\Sigma_{X_1 \vert X_2} = \Sigma_{11} - \Sigma_{12}\Sigma_{22}^{-1} \Sigma_{21}$ Now, let's look at this in our context. -Suppose we have, $D_n = (X_n, Y_n)$ where $Y_n \sim N \ ( \ 0 \ , \ \Sigma_n \ )$. Now, for a new location $x_p$, we need to find the distribution of$Y(x_p)$. +Suppose we have, $D_n = (X_n, Y_n)$ where $Y_n \sim N \ ( \ 0 \ , \ \Sigma_n \ )$. Now, for a new location $x_p$, we need to find the distribution of $Y(x_p)$. We want to find the distribution of $Y(x_p) \ \vert \ D_n$. Using the information from above, we know this is normally distributed and we need to identify then mean and variance. Thus, we have diff --git a/GP_Practical.qmd b/GP_Practical.qmd index 23bf0f2..6450140 100644 --- a/GP_Practical.qmd +++ b/GP_Practical.qmd @@ -170,11 +170,10 @@ head(target) \begin{equation} \begin{aligned} f(y) \ & = \text{log } \ (y + 1) \ \ ; \ \ \ \\[2pt] - \end{aligned} \end{equation} -We pass in ($response$ + 1) into this function to ensure we don';t take a log of 0. We will adjust this in our back transform. +We pass in (`response` + 1) into this function to ensure we don't take a log of 0. We will adjust this in our back transform. Let's write a function for this, as well as the inverse of the transform. @@ -380,7 +379,7 @@ Now, we will create a grid from the first week in our dataset to 1 year into the startdate <- as.Date(min(df$datetime))# identify start week grid_datetime <- seq.Date(startdate, Sys.Date() + 365, by = 7) # create sequence from -# Build the inpu space for the predictive space (All weeks from 04-2014 to 07-2025) +# Build the input space for the predictive space (All weeks from 04-2014 to 07-2025) XXt1 <- fx.iso_week(grid_datetime) XXt2 <- fx.sin(grid_datetime)