Skip to content

Commit 1823240

Browse files
committed
update docs
1 parent 64965f0 commit 1823240

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/_build/html/_sources/guides/data/twosample_test.rst.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Distance Metrics
1717

1818
.. math::
1919
\begin{align}
20-
PSI = \sum^{B}_{i=1} (p(x) - q(x))ln (\frac{p(x)}{q(x)}),
20+
PSI = \sum^{B}_{i=1} (p(x_i) - q(x_i))ln \frac{p(x_i)}{q(x_i)},
2121
\end{align}
2222
2323
where :math:`B` is the number of bins, :math:`p(x)` and :math:`q(x)` is the empirical density function of the base and target population, respectively. Note that the PSI calculation is related to the binning method, and we have two options for binning, i.e., "uniform" and "quantile". The number of bins is fixed at 10.
@@ -26,7 +26,7 @@ where :math:`B` is the number of bins, :math:`p(x)` and :math:`q(x)` is the empi
2626

2727
.. math::
2828
\begin{align}
29-
WD_{1} = \sum^{B}_{i=1} |P(x) - Q(x)|,
29+
WD_{1} = \int |P(x) - Q(x)| dx,
3030
\end{align}
3131
3232
where and :math:`P(x)` and :math:`Q(x)` are the cumulative distribution of the target and base population.
@@ -35,11 +35,11 @@ where and :math:`P(x)` and :math:`Q(x)` are the cumulative distribution of the t
3535

3636
.. math::
3737
\begin{align}
38-
KS = \max |P(x) - Q(x)|,
38+
KS = \sup_x |P(x) - Q(x)|.
3939
\end{align}
4040
41-
In PiML, the WD1 and KS statistics are calculated by the `wasserstein_distance` and `ks_2samp` functions from `scipy.stats`, where we don't need to specify the binning method.
42-
41+
In PiML, the WD1 and KS statistics are calculated by the `wasserstein_distance` and `ks_2samp` functions from `scipy.stats`.
42+
4343

4444
Usage
4545
^^^^^^^^^^^^^^^^^^^^^^^^^

docs/_build/html/guides/data/twosample_test.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,25 @@ <h2><span class="section-number">2.7.1. </span>Distance Metrics<a class="headerl
256256
</ul>
257257
<div class="math notranslate nohighlight">
258258
\[\begin{align}
259-
PSI = \sum^{B}_{i=1} (p(x) - q(x))ln (\frac{p(x)}{q(x)}),
259+
PSI = \sum^{B}_{i=1} (p(x_i) - q(x_i))ln \frac{p(x_i)}{q(x_i)},
260260
\end{align}\]</div>
261261
<p>where <span class="math notranslate nohighlight">\(B\)</span> is the number of bins, <span class="math notranslate nohighlight">\(p(x)\)</span> and <span class="math notranslate nohighlight">\(q(x)\)</span> is the empirical density function of the base and target population, respectively. Note that the PSI calculation is related to the binning method, and we have two options for binning, i.e., “uniform” and “quantile”. The number of bins is fixed at 10.</p>
262262
<ul class="simple">
263263
<li><p><strong>Wasserstein distance 1D (WD1)</strong>: WD1 calculates the absolute difference between the cumulative distribution functions of the two samples.</p></li>
264264
</ul>
265265
<div class="math notranslate nohighlight">
266266
\[\begin{align}
267-
WD_{1} = \sum^{B}_{i=1} |P(x) - Q(x)|,
267+
WD_{1} = \int |P(x) - Q(x)| dx,
268268
\end{align}\]</div>
269269
<p>where and <span class="math notranslate nohighlight">\(P(x)\)</span> and <span class="math notranslate nohighlight">\(Q(x)\)</span> are the cumulative distribution of the target and base population.</p>
270270
<ul class="simple">
271271
<li><p><strong>Kolmogorov-Smirnov (KS)</strong>: KS calculates the maximum absolute distance between the cumulative distribution functions of the two samples. In PiML, the WD1 statistics are calculated by the function from <code class="docutils literal notranslate"><span class="pre">scipy.stats</span></code>.</p></li>
272272
</ul>
273273
<div class="math notranslate nohighlight">
274274
\[\begin{align}
275-
KS = \max |P(x) - Q(x)|,
275+
KS = \sup_x |P(x) - Q(x)|.
276276
\end{align}\]</div>
277-
<p>In PiML, the WD1 and KS statistics are calculated by the <code class="docutils literal notranslate"><span class="pre">wasserstein_distance</span></code> and <code class="docutils literal notranslate"><span class="pre">ks_2samp</span></code> functions from <code class="docutils literal notranslate"><span class="pre">scipy.stats</span></code>, where we don’t need to specify the binning method.</p>
277+
<p>In PiML, the WD1 and KS statistics are calculated by the <code class="docutils literal notranslate"><span class="pre">wasserstein_distance</span></code> and <code class="docutils literal notranslate"><span class="pre">ks_2samp</span></code> functions from <code class="docutils literal notranslate"><span class="pre">scipy.stats</span></code>.</p>
278278
</section>
279279
<section id="usage">
280280
<h2><span class="section-number">2.7.2. </span>Usage<a class="headerlink" href="#usage" title="Permalink to this heading"></a></h2>

0 commit comments

Comments
 (0)