Skip to content

Commit

Permalink
small changes and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
parulvijay committed Jul 19, 2024
1 parent 02a902e commit df1ca8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions GP.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Y_n \\
\end{aligned}
\end{equation}
```

## Hyper Parameters

. . .
Expand All @@ -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

Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion GP_Notes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions GP_Practical.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ head(target)
\begin{equation}
\begin{aligned}
f(y) \ & = \text{log } \ (y + 1) \ \ ; \ \ \ \\[2pt]
<!-- \ & = \sqrt{y} \ \ \ \; \ \ \ otherwise -->
\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.

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit df1ca8d

Please sign in to comment.