Skip to content

Commit

Permalink
properly escape math with \\( instead of $
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHancock committed May 1, 2024
1 parent 3ba95da commit 506ed7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions _episodes/ExpertSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ plt.show()

![Scaled image]({{page.root}}{% link fig/ScaledData.png %})

In the above image the color scale has been cropped to $\pm 3\sigma$.
In the above image the color scale has been cropped to \\(\pm 3\sigma\\).
Compared to the original image we have:
- Reduced the prominence of whatever is going on at time $\sim 20$ and distance $\sim 0$
- Increased the prominence of the ripple in the regin around distance $\sim 50$
- Reduced the prominence of whatever is going on at time \\(\sim 20\\) and distance \\(\sim 0\\)
- Increased the prominence of the ripple in the regin around distance \\(\sim 50\\)


At this point we can make a new observation - the signal seems to follow a $t \sim \sqrt{d}$ relation starting at $d=0$ and $t=\sim25$.
At this point we can make a new observation - the signal seems to follow a \\(t \sim \sqrt{d}\\) relation starting at \\(d=0\\) and \\(t=\sim25\\).

Since our signal is distributed over multiple pixels, we could sum along the path of the signal, and hopefully the signal will accumulate while the noise will cancel out (regression to the mean).
This is a standard approach and relies on the signal having some coherence over the summation whilst the noise does not.
Expand Down Expand Up @@ -314,8 +314,6 @@ cropped_data = scaled_data[:,25:75]
> {: .language-python}
>
> Once you have a relationship between t and d post your best result in the [etherpad]({{site.etherpad}}).

{: .challenge}

My example is below:
Expand Down Expand Up @@ -648,7 +646,7 @@ Our signal of interest has a particular shape within our data.
We don't need to completely remove the signal from our data, but we need to hide it from our algorithm.
Understanding what our signal looks like and how our algorithm works gives us an advantage here.

Our signal follows a roughly $t \propto \sqrt(d)$ relation and we shift all our data to account for this.
Our signal follows a roughly \\(t \propto \sqrt{d}\\) relation and we shift all our data to account for this.
If we were to invert our data along the time or distance dimension and perform the same shifting, then we will mix our signal in the same way that we mix the noise.
Let's try this out now.

Expand Down
4 changes: 2 additions & 2 deletions _episodes/ML.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ Our data is a time series of a single value so this is a 1D model that we'll be

As an example of an autogressive model, suppose we want to predict the next value in a sequence using the previous two values as input.
The previous two values are often referred to as **lags**.
In the figure below we have a prediction model (the $\script{F}$) taking two lagged values ($X_{t-1}, X_{t-2}$) as input (and optionally extra data $\epsilon$ ) to produce the prediction of $X_t$.
In the figure below we have a prediction model (the \\(f\\)) taking two lagged values (\\(X_{t-1},~ X_{t-2}\\)) as input (and optionally extra data \\(\epsilon\\)) to produce the prediction of \\(X_t\\).

![Auto regression]({{page.root}}{% link fig/AutoReg.png %})
*Credit:[10.3390/info14110598](https://doi.org/10.3390/info14110598)*

Note that in the above diagram the prediction for $X_{t+1}$ uses the previous prediction as an input.
Note that in the above diagram the prediction for \\(X_{t+1}\\) uses the previous prediction as an input.
This is a key feature of time-series algorithms, and it means that you can easily end up in a situation where the output is oscillating or growing without bound as the algorithm amplifies prediction errors.
One way to avoid this delirious behavior is incorporate additional (exogeneous) data into the prediction.
This is not within the scope of our lesson for today.
Expand Down

0 comments on commit 506ed7f

Please sign in to comment.