Reputation: 484
I have the following text with math notation written in Markdown in a Jupyter Notebook:
* (linear regression model prediction) : y = $\theta_0$ + $\theta_1$$x_1$ + $\theta_2$$x_2$ + $\theta_n$$x_n$
* (...in vectorized form) ------------ : y = $h_\theta$(x) = $\Theta$.x
Somehow when this notebook was uploaded to GitHub, the first part was not rendered correctly, whereas the second part was rendered correctly, as shown in the image below:
The same markdown text was rendered correctly when this notebook was open in VSCode:
May I ask how to solve this inconsistency in rendering math notations via Markdown in Jupyter Notebook?
The problematic jupyter notebook mentioned above is show here.
Upvotes: 1
Views: 1547
Reputation: 39383
If you look at the raw file, you can see that it simply contains a markdown cell with that math. So GitHub's Jupyter rendering doesn't recognize this as math (apparently they use an old nbconvert
version under the hood).
But probably you can avoid the problem by not using double dollars $$
. Usually, you would write this in markdown like this:
* linear regression model prediction: $y = \theta_0 + \theta_1x_1 + \theta_2x_2 + \theta_nx_n$
* in vectorized form: $y = h_\theta(x) = \Theta.x$
Upvotes: 1