|
68 | 68 | "Note that the first four element are change point indexes while the last is simply the number of samples.\n", |
69 | 69 | "(This is a technical convention so that functions in `ruptures` always know the length of the signal at hand.)\n", |
70 | 70 | "\n", |
71 | | - "It is also possible to plot our $\\mathbb{R}^3$-valued signal along with the true change points with the `rpt.display` function.\n", |
| 71 | + "It is also possible to plot our \\(\\mathbb{R}^3\\)-valued signal along with the true change points with the `rpt.display` function.\n", |
72 | 72 | "In the following image, the color changes whenever the mean of the signal shifts." |
73 | 73 | ] |
74 | 74 | }, |
|
88 | 88 | "## Change point detection\n", |
89 | 89 | "We can now perform change point detection, meaning that we find the indexes where the signal mean changes.\n", |
90 | 90 | "To that end, we minimize the sum of squared errors when approximating the signal by a piecewise constant signal.\n", |
91 | | - "Formally, for a signal $y_0,y_1,\\dots,y_{T-1}$ ($T$ samples), we solve the following optimization problem, over all possible change positions $t_1<t_2<\\dots<t_K$ (where the number $K$ of changes is defined by the user):\n", |
| 91 | + "Formally, for a signal \\( y_0 , y_1 , \\dots , y_{T-1} \\) (\\( T \\) samples), we solve the following optimization problem, over all possible change positions \\( t_1 < t_2 < \\dots < t_K \\)\n", |
| 92 | + "where the number \\( K \\) of changes is defined by the user:\n", |
92 | 93 | "\n", |
93 | | - "$$\n", |
94 | | - "\\hat{t}_1, \\hat{t}_2,\\dots,\\hat{t}_K = \\arg\\min_{t_1,\\dots,t_K} V(t_1,t_2,\\dots,t_K)\n", |
95 | | - "$$\n", |
| 94 | + "\\[\n", |
| 95 | + " \\hat{t}_1, \\hat{t}_2,\\dots,\\hat{t}_K = \\arg\\min_{t_1,\\dots,t_K} V(t_1,t_2,\\dots,t_K)\n", |
| 96 | + "\\]\n", |
96 | 97 | "\n", |
97 | 98 | "with\n", |
98 | 99 | "\n", |
99 | | - "$$\n", |
100 | | - "V(t_1,t_2,\\dots,t_K) := \\sum_{k=0}^K\\sum_{t=t_k}^{t_{k+1}-1} \\|y_t-\\bar{y}_{t_k..t_{k+1}}\\|^2\n", |
101 | | - "$$\n", |
| 100 | + "\\[\n", |
| 101 | + " V(t_1,t_2,\\dots,t_K) := \\sum_{k=0}^K\\sum_{t=t_k}^{t_{k+1}-1} \\|y_t-\\bar{y}_{t_k..t_{k+1}}\\|^2\n", |
| 102 | + "\\]\n", |
102 | 103 | "\n", |
103 | | - "where $\\bar{y}_{t_k..t_{k+1}}$ is the empirical mean of the sub-signal $y_{t_k}, y_{t_k+1},\\dots,y_{t_{k+1}-1}$.\n", |
104 | | - "(By convention $t_0=0$ and $t_{K+1}=T$.)\n", |
105 | 104 | "\n", |
106 | | - "This optimization is solved with dynamic programming, using the [`Dynp`](../user-guide/detection/dynp.md) class. (More information in the section [What is change point detection?](/what-is-cpd) and the [User guide](/user-guide).)" |
| 105 | + "where \\( \\bar{y}_{t_k..t_{k+1}} \\) is the empirical mean of the sub-signal \\( y_{t_k}, y_{t_k+1},\\dots,y_{t_{k+1}-1} \\).\n", |
| 106 | + "(By convention \\( t_0=0 \\) and \\( t_{K+1}=T \\).)\n", |
| 107 | + "\n", |
| 108 | + "This optimization is solved with dynamic programming, using the [`Dynp`](../user-guide/detection/dynp.md) class. (More information in the section [What is change point detection?](/what-is-cpd) and the [User guide](/user-guide).)\n" |
107 | 109 | ] |
108 | 110 | }, |
109 | 111 | { |
|
0 commit comments