Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
l-wrobel committed Jul 27, 2024
1 parent f43521c commit 10ffee9
Show file tree
Hide file tree
Showing 24 changed files with 445 additions and 96 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0eb7277f01db36adf0c9e2de00a14f9c
config: 0d77ee224c53839dfb82cf6699bb1349
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/_images/rst_tutorials_example_usage_10_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_example_usage_12_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_example_usage_4_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_example_usage_7_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_use_case_3_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_use_case_5_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_images/rst_tutorials_use_case_7_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions docs/_sources/rst/tutorials/example_usage.ipynb.txt

Large diffs are not rendered by default.

150 changes: 136 additions & 14 deletions docs/_sources/rst/tutorials/use_case.ipynb.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: 'v1.0.0',
VERSION: 'v1.0.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
7 changes: 4 additions & 3 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Search = {

htmlToText: (htmlString, anchor) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
for (const removalQuery of [".headerlinks", "script", "style"]) {
for (const removalQuery of [".headerlink", "script", "style"]) {
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
}
if (anchor) {
Expand Down Expand Up @@ -328,13 +328,14 @@ const Search = {
for (const [title, foundTitles] of Object.entries(allTitles)) {
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
const score = Math.round(Scorer.title * queryLower.length / title.length);
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
normalResults.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
null,
score,
score + boost,
filenames[file],
]);
}
Expand Down
6 changes: 3 additions & 3 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; IMCP v1.0.0 documentation</title>
<title>Index &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=76e2d817"></script>
<script src="_static/documentation_options.js?v=d29a5c0e"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -144,7 +144,7 @@ <h2 id="P">P</h2>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IMCP &mdash; IMCP v1.0.0 documentation</title>
<title>IMCP &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand All @@ -16,7 +16,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=76e2d817"></script>
<script src="_static/documentation_options.js?v=d29a5c0e"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -112,7 +112,7 @@ <h1>Installation<a class="headerlink" href="#installation" title="Link to this h
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; IMCP v1.0.0 documentation</title>
<title>Python Module Index &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=76e2d817"></script>
<script src="_static/documentation_options.js?v=d29a5c0e"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h1>Python Module Index</h1>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
11 changes: 7 additions & 4 deletions docs/rst/autodoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Code documentation &mdash; IMCP v1.0.0 documentation</title>
<title>Code documentation &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
Expand All @@ -16,7 +16,7 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=76e2d817"></script>
<script src="../_static/documentation_options.js?v=d29a5c0e"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -217,7 +217,7 @@

<dl class="py function">
<dt class="sig sig-object py" id="imcp.plot_curve">
<span class="sig-prename descclassname"><span class="pre">imcp.</span></span><span class="sig-name descname"><span class="pre">plot_curve</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_fig_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig_title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'(I)MCP</span> <span class="pre">curve(s)'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#imcp.plot_curve" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">imcp.</span></span><span class="sig-name descname"><span class="pre">plot_curve</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">output_fig_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig_title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'(I)MCP</span> <span class="pre">curve(s)'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">xlabel</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'samples'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ylabel</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'(I)MCP</span> <span class="pre">score'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#imcp.plot_curve" title="Link to this definition"></a></dt>
<dd><p>Plot curves described with given x and y coordinates.
To plot multiple curves, pass x and y as 2D arrays. Each row will be plotted
as a separate curve.</p>
Expand All @@ -228,6 +228,9 @@
<li><p><strong>y</strong> (<em>array-like</em><em> or </em><em>array</em><em> of </em><em>arrays. Must be</em><em> of </em><em>the same shape as x.</em>)</p></li>
<li><p><strong>label</strong> (<em>single label</em><em> or </em><em>list</em><em> of </em><em>labels</em><em>, </em><em>which will be displayed on the plot as legend</em>)</p></li>
<li><p><strong>output_fig_path</strong> (<em>if given</em><em>, </em><em>figure will be saved at this location. If no file extension is given</em><em>,</em>) – png will be used by default. Most backends support png, pdf, ps, eps and svg extensions.</p></li>
<li><p><strong>fig_title</strong> (<em>title</em><em> of </em><em>the figure.</em>)</p></li>
<li><p><strong>xlabel</strong> (<em>label</em><em> of </em><em>the x-axis.</em>)</p></li>
<li><p><strong>ylabel</strong> (<em>label</em><em> of </em><em>the y-axis.</em>)</p></li>
</ul>
</dd>
</dl>
Expand Down Expand Up @@ -294,7 +297,7 @@
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
6 changes: 3 additions & 3 deletions docs/rst/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tutorials &mdash; IMCP v1.0.0 documentation</title>
<title>Tutorials &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
Expand All @@ -16,7 +16,7 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=76e2d817"></script>
<script src="../_static/documentation_options.js?v=d29a5c0e"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h1>Tutorials<a class="headerlink" href="#tutorials" title="Link to this heading
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
18 changes: 9 additions & 9 deletions docs/rst/tutorials/example_usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example Usage &mdash; IMCP v1.0.0 documentation</title>
<title>Example Usage &mdash; IMCP v1.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
Expand All @@ -17,7 +17,7 @@

<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=76e2d817"></script>
<script src="../../_static/documentation_options.js?v=d29a5c0e"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
Expand Down Expand Up @@ -97,7 +97,7 @@
<section id="Example-Usage">
<h1>Example Usage<a class="headerlink" href="#Example-Usage" title="Link to this heading"></a></h1>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">imcp</span> <span class="kn">import</span> <span class="n">mcp_curve</span><span class="p">,</span> <span class="n">mcp_score</span><span class="p">,</span> <span class="n">plot_mcp_curve</span><span class="p">,</span> <span class="n">imcp_curve</span><span class="p">,</span> <span class="n">imcp_score</span><span class="p">,</span> <span class="n">plot_imcp_curve</span><span class="p">,</span> <span class="n">plot_curve</span>
Expand All @@ -116,7 +116,7 @@ <h2>MCP curve<a class="headerlink" href="#MCP-curve" title="Link to this heading
<section id="Single-MCP-curve">
<h3>Single MCP curve<a class="headerlink" href="#Single-MCP-curve" title="Link to this heading"></a></h3>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">X</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">load_iris</span><span class="p">(</span><span class="n">return_X_y</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
Expand Down Expand Up @@ -150,7 +150,7 @@ <h3>Single MCP curve<a class="headerlink" href="#Single-MCP-curve" title="Link t
<h3>Multiple MCP curves<a class="headerlink" href="#Multiple-MCP-curves" title="Link to this heading"></a></h3>
<p>More plots can be drawn on the same figure to make comparison between curves easier. Example below presents curves calculated for different ways of obtaining class probabilities.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[8]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">X</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">load_iris</span><span class="p">(</span><span class="n">return_X_y</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
Expand Down Expand Up @@ -179,7 +179,7 @@ <h3>Multiple MCP curves<a class="headerlink" href="#Multiple-MCP-curves" title="
Area under MCP curve for LogisticRegression: 0.6429
Area under MCP curve for RandomForestClassifier: 0.9549
Area under MCP curve for GradientBoostingClassifier: 0.9927
Area under MCP curve for SVC: 0.8368
Area under MCP curve for SVC: 0.8463
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
Expand All @@ -197,7 +197,7 @@ <h2>IMCP curve<a class="headerlink" href="#IMCP-curve" title="Link to this headi
<p>There have been implemented analogous methods for all mcp methods - imcp_curve, imcp_score and plot_imcp_curve.</p>
<p>Also, in case that user wants to plot, for example, regular curve and imbalanced curve on the same plot, the plot_curve method has been developed. It allows user to plot any number of curves given as arguments in the same style as plot_mcp_curve and plot_imcp_curve. It is also possible to save figure plot with that method after user has specified output figure path.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[9]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">&#39;../../../../tests/test_imbalanced_class_probs.csv&#39;</span><span class="p">)</span>
Expand Down Expand Up @@ -229,7 +229,7 @@ <h2>IMCP curve<a class="headerlink" href="#IMCP-curve" title="Link to this headi
</div>
<p>Plotting regular MCP and IMCP on the same figure</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mcp_x</span><span class="p">,</span> <span class="n">mcp_y</span> <span class="o">=</span> <span class="n">mcp_curve</span><span class="p">(</span><span class="n">y_true</span><span class="p">,</span> <span class="n">y_score</span><span class="p">,</span> <span class="n">abs_tolerance</span><span class="o">=</span><span class="mf">0.0000001</span><span class="p">)</span>
Expand Down Expand Up @@ -260,7 +260,7 @@ <h2>IMCP curve<a class="headerlink" href="#IMCP-curve" title="Link to this headi
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023.</p>
<p>&#169; Copyright 2024.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
Loading

0 comments on commit 10ffee9

Please sign in to comment.