Skip to content

Commit aeccee1

Browse files
committed
Update stable dir
1 parent d1bf291 commit aeccee1

File tree

227 files changed

+15860
-10946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+15860
-10946
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

stable/_modules/cleanlab/benchmarking/noise_generation.html

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<link rel="shortcut icon" href="https://raw.githubusercontent.com/cleanlab/assets/a4483476d449f2f05a4c7cde329e72358099cc07/cleanlab/cleanlab_favicon.svg"/><!-- Generated with Sphinx 7.1.2 and Furo 2023.09.10 -->
1818
<title>cleanlab.benchmarking.noise_generation - cleanlab</title>
19-
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=a746c00c" />
19+
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=8f2a1f02" />
2020
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo.css?v=135e06be" />
2121
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css?v=76b2166b" />
2222
<link rel="stylesheet" type="text/css" href="../../../_static/tabs.css?v=a5c4661c" />
@@ -169,7 +169,7 @@
169169

170170
</a>
171171

172-
<div class="centered">
172+
<div style="margin-left: 12px; margin-top: 4px;">
173173
<a style="margin-top: 6px;" class="github-button" href="https://github.com/cleanlab/cleanlab" data-size="large" data-show-count="true"
174174
aria-label="Star cleanlab/cleanlab on GitHub">Star</a>
175175
</div>
@@ -378,6 +378,15 @@
378378
>
379379
</li>
380380

381+
<li class="toctree-l1">
382+
<a
383+
id="v2.7.1"
384+
class="reference internal"
385+
href="/v2.7.1/"
386+
>v2.7.1</a
387+
>
388+
</li>
389+
381390
<li class="toctree-l1">
382391
<a
383392
id="v2.7.0"
@@ -583,38 +592,55 @@
583592

584593

585594
<noscript>
586-
<div class="admonition warning">
587-
<p class="admonition-title">Warning</p>
588-
<p>Parts of this site uses JavaScript, but your browser does not support it.</p>
589-
</div>
595+
<div class="admonition warning">
596+
<p class="admonition-title">Warning</p>
597+
<p>
598+
Parts of this site uses JavaScript, but your browser does not
599+
support it.
600+
</p>
601+
</div>
590602
</noscript>
591603

604+
<div>
605+
<agility-assistant
606+
access-token="public-assistant-1e1cd1d0-5f87546555cc7497"
607+
assistant-id="69391e48-a95f-4f8d-8dc2-025f1e1cd1d0"
608+
assistant-title="Cleanlab Open Source Assistant"
609+
assistant-placeholder="Ask a question"
610+
assistant-description="An assistant to help you with your questions about Cleanlab Open Source"
611+
logo-url="https://cleanlab.ai/icon-512.png"
612+
/>
613+
</div>
614+
592615

593616

594617
<!-- Start of Version Warning Banner -->
595618

596619
<p id="doc_ver_warning"></p>
597620

598-
<script
599-
type="text/javascript"
600-
src="/versioning.js"
601-
></script>
621+
<script type="text/javascript" src="/versioning.js"></script>
602622
<script type="text/javascript">
603623
window.addEventListener("load", () => {
604624
const version_number = Version.version_number;
605625
const path_arr = window.location.pathname.split("/");
606626

607627
if (path_arr.includes("master")) {
608-
document.getElementById("doc_ver_warning").innerHTML =
609-
`<div class="admonition warning">
628+
document.getElementById(
629+
"doc_ver_warning"
630+
).innerHTML = `<div class="admonition warning">
610631
<p class="admonition-title">Warning</p>
611632
<p>This version of the documentation corresponds to the master branch of <code class="docutils literal notranslate"><span class="pre">cleanlab</span></code> source code from <a href="https://github.com/cleanlab/cleanlab/">GitHub</a>. To see the documentation for the latest <code class="docutils literal notranslate"><span class="pre">pip</span></code>-installed version, click <a href="/">here</a>.</p>
612633
</div>`;
613-
} else if (!path_arr.includes(version_number) && !path_arr.includes("stable")) {
634+
} else if (
635+
!path_arr.includes(version_number) &&
636+
!path_arr.includes("stable")
637+
) {
614638
document.getElementById("doc_ver_warning").innerHTML =
615-
`<div class="admonition warning">
639+
`<div class="admonition warning">
616640
<p class="admonition-title">Warning</p>
617-
<p>This documentation is for an old version (<code class="docutils literal notranslate"><span class="pre">v2.7.0</span></code>) of <code class="docutils literal notranslate"><span class="pre">cleanlab</span></code>. To see the documentation for the latest stable version (<code class="docutils literal notranslate"><span class="pre">` + version_number + `</span></code>), click <a href="/">here</a>.</p>
641+
<p>This documentation is for an old version (<code class="docutils literal notranslate"><span class="pre">v2.7.1</span></code>) of <code class="docutils literal notranslate"><span class="pre">cleanlab</span></code>. To see the documentation for the latest stable version (<code class="docutils literal notranslate"><span class="pre">` +
642+
version_number +
643+
`</span></code>), click <a href="/">here</a>.</p>
618644
</div>`;
619645
} else {
620646
document.getElementById("doc_ver_warning").remove();
@@ -649,14 +675,14 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
649675
<span class="sd">generating noisy labels given a noise matrix, generating valid noise matrices with a specific trace value, and more.</span>
650676
<span class="sd">&quot;&quot;&quot;</span>
651677

652-
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Optional</span>
678+
<span class="kn">from</span><span class="w"> </span><span class="nn">typing</span><span class="w"> </span><span class="kn">import</span> <span class="n">Optional</span>
653679

654-
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
655-
<span class="kn">from</span> <span class="nn">cleanlab.internal.util</span> <span class="kn">import</span> <span class="n">value_counts</span>
656-
<span class="kn">from</span> <span class="nn">cleanlab.internal.constants</span> <span class="kn">import</span> <span class="n">FLOATING_POINT_COMPARISON</span>
680+
<span class="kn">import</span><span class="w"> </span><span class="nn">numpy</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nn">np</span>
681+
<span class="kn">from</span><span class="w"> </span><span class="nn">cleanlab.internal.util</span><span class="w"> </span><span class="kn">import</span> <span class="n">value_counts</span>
682+
<span class="kn">from</span><span class="w"> </span><span class="nn">cleanlab.internal.constants</span><span class="w"> </span><span class="kn">import</span> <span class="n">FLOATING_POINT_COMPARISON</span>
657683

658684

659-
<div class="viewcode-block" id="noise_matrix_is_valid"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.noise_matrix_is_valid">[docs]</a><span class="k">def</span> <span class="nf">noise_matrix_is_valid</span><span class="p">(</span><span class="n">noise_matrix</span><span class="p">,</span> <span class="n">py</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
685+
<div class="viewcode-block" id="noise_matrix_is_valid"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.noise_matrix_is_valid">[docs]</a><span class="k">def</span><span class="w"> </span><span class="nf">noise_matrix_is_valid</span><span class="p">(</span><span class="n">noise_matrix</span><span class="p">,</span> <span class="n">py</span><span class="p">,</span> <span class="o">*</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
660686
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Given a prior `py` representing ``p(true_label=k)``, checks if the given `noise_matrix` is a</span>
661687
<span class="sd"> learnable matrix. Learnability means that it is possible to achieve</span>
662688
<span class="sd"> better than random performance, on average, for the amount of noise in</span>
@@ -734,7 +760,7 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
734760
<span class="k">return</span> <span class="kc">True</span></div>
735761

736762

737-
<div class="viewcode-block" id="generate_noisy_labels"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_noisy_labels">[docs]</a><span class="k">def</span> <span class="nf">generate_noisy_labels</span><span class="p">(</span><span class="n">true_labels</span><span class="p">,</span> <span class="n">noise_matrix</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span>
763+
<div class="viewcode-block" id="generate_noisy_labels"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_noisy_labels">[docs]</a><span class="k">def</span><span class="w"> </span><span class="nf">generate_noisy_labels</span><span class="p">(</span><span class="n">true_labels</span><span class="p">,</span> <span class="n">noise_matrix</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span>
738764
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Generates noisy `labels` from perfect labels `true_labels`,</span>
739765
<span class="sd"> &quot;exactly&quot; yielding the provided `noise_matrix` between `labels` and `true_labels`.</span>
740766

@@ -816,7 +842,7 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
816842
<span class="k">return</span> <span class="n">labels</span></div>
817843

818844

819-
<div class="viewcode-block" id="generate_noise_matrix_from_trace"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_noise_matrix_from_trace">[docs]</a><span class="k">def</span> <span class="nf">generate_noise_matrix_from_trace</span><span class="p">(</span>
845+
<div class="viewcode-block" id="generate_noise_matrix_from_trace"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_noise_matrix_from_trace">[docs]</a><span class="k">def</span><span class="w"> </span><span class="nf">generate_noise_matrix_from_trace</span><span class="p">(</span>
820846
<span class="n">K</span><span class="p">,</span>
821847
<span class="n">trace</span><span class="p">,</span>
822848
<span class="o">*</span><span class="p">,</span>
@@ -981,7 +1007,7 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
9811007
<span class="k">return</span> <span class="kc">None</span></div>
9821008

9831009

984-
<div class="viewcode-block" id="generate_n_rand_probabilities_that_sum_to_m"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_n_rand_probabilities_that_sum_to_m">[docs]</a><span class="k">def</span> <span class="nf">generate_n_rand_probabilities_that_sum_to_m</span><span class="p">(</span>
1010+
<div class="viewcode-block" id="generate_n_rand_probabilities_that_sum_to_m"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.generate_n_rand_probabilities_that_sum_to_m">[docs]</a><span class="k">def</span><span class="w"> </span><span class="nf">generate_n_rand_probabilities_that_sum_to_m</span><span class="p">(</span>
9851011
<span class="n">n</span><span class="p">,</span>
9861012
<span class="n">m</span><span class="p">,</span>
9871013
<span class="o">*</span><span class="p">,</span>
@@ -1073,7 +1099,7 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
10731099
<span class="k">return</span> <span class="n">result</span></div>
10741100

10751101

1076-
<div class="viewcode-block" id="randomly_distribute_N_balls_into_K_bins"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.randomly_distribute_N_balls_into_K_bins">[docs]</a><span class="k">def</span> <span class="nf">randomly_distribute_N_balls_into_K_bins</span><span class="p">(</span>
1102+
<div class="viewcode-block" id="randomly_distribute_N_balls_into_K_bins"><a class="viewcode-back" href="../../../cleanlab/benchmarking/noise_generation.html#cleanlab.benchmarking.noise_generation.randomly_distribute_N_balls_into_K_bins">[docs]</a><span class="k">def</span><span class="w"> </span><span class="nf">randomly_distribute_N_balls_into_K_bins</span><span class="p">(</span>
10771103
<span class="n">N</span><span class="p">,</span> <span class="c1"># int</span>
10781104
<span class="n">K</span><span class="p">,</span> <span class="c1"># int</span>
10791105
<span class="o">*</span><span class="p">,</span>
@@ -1140,7 +1166,7 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
11401166
<div class="bottom-of-page">
11411167
<div class="left-details">
11421168
<div class="copyright">
1143-
Copyright &#169; 2024, Cleanlab Inc.
1169+
Copyright &#169; 2025, Cleanlab Inc.
11441170
</div>
11451171
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
11461172

@@ -1191,5 +1217,6 @@ <h1>Source code for cleanlab.benchmarking.noise_generation</h1><div class="highl
11911217
<script src="https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^1.0.1/dist/embed-amd.js"></script>
11921218

11931219
<script async defer src="https://buttons.github.io/buttons.js"></script>
1220+
<script src="https://cdn.cleanlab.ai/v1.1.1/agility-web-component.js"></script>
11941221
</body>
11951222
</html>

0 commit comments

Comments
 (0)