首页 > 解决方案 > Jupyter 笔记本 mathjax 内联符号与文本重叠

问题描述

我在 Mozilla Firefox (66.0.3) 中使用 ipykernel (v5.1.0) 运行 Jupyter notebook,但我也看到 Chrome 中发生了这种情况。如果该信息相关,我使用的是 Windows 10、64 位。

在现有笔记本上渲染 mathjax 时,它通常看起来像:

在此处输入图像描述

其中内联 mathjax 符号似乎与正文重叠。似乎渲染器将数学内容视为具有零宽度(?)。

只是要清楚:

底层代码如下所示:

<span class="kw">Principal Component Analysis</span> is an unsupervised linear transformation technique.
It helps to identify patterns in data based on correlations between features.

PCA aims to find the directions of maximum variance in high-dimensional data and projects them onto a new subspace spanned by these vectors (with equal/fewer dimensions than the original one).
Mathematically-speaking, we construct a $d\times k$-dimensional transformation matrix $W$ that allows us to map a sample vector $x$ in $d$-dimensional feature space ($x\in \mathbb{R}^d$) onto a new $k$-dimensional subspace.

$$
x \longrightarrow z = xW
$$

**General PCA algorithm**
1. Center the $d$-dimensional dataset around the origin. Z-scoring (dividing by stdev may help, or not).
2. Construct covariance matrix.
3. Decompose the covariance matrix onto its eigenvectors and eigenvalues.
4. Sort the eigenvalues by decreasing order to rank the corresponding eigenvectors.
5. Select $k$ eigenvectors that correspond to the $k$ largest eigenvalues, where $k$ is the dimensionality of the new feature subspace ($k\leq d$)
6. Construct a projection matrix $W$ from the $k$ eigenvectors chosen in step 4.
7. Perform the projection by multiplying $X^\top W$ (a $n\times k$ matrix), to obtain a new $k$-dimensional feature subspace.

我不认为我自己是唯一遇到这种情况的人,但我无法找到任何人在网上讨论这个问题。我该如何解决?

标签: jupyter-notebookjupytermathjax

解决方案


推荐阅读