Skip to content

Commit

Permalink
deploy: dceb470
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Dec 9, 2023
1 parent b742e7e commit b7b6797
Show file tree
Hide file tree
Showing 39 changed files with 19,943 additions and 20,138 deletions.
4 changes: 2 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Page Not Found | CyclOps</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://vectorinstitute.github.io/cyclops/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | CyclOps"><link data-rh="true" rel="icon" href="/cyclops/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://vectorinstitute.github.io/cyclops/404.html"><link data-rh="true" rel="alternate" href="https://vectorinstitute.github.io/cyclops/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://vectorinstitute.github.io/cyclops/404.html" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/cyclops/blog/rss.xml" title="CyclOps RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/cyclops/blog/atom.xml" title="CyclOps Atom Feed"><link rel="stylesheet" href="/cyclops/assets/css/styles.bd9f4b2a.css">
<script src="/cyclops/assets/js/runtime~main.ed9ccda4.js" defer="defer"></script>
<script src="/cyclops/assets/js/main.5ab33cdc.js" defer="defer"></script>
<script src="/cyclops/assets/js/runtime~main.29a116ab.js" defer="defer"></script>
<script src="/cyclops/assets/js/main.040305dd.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/cyclops/"><div class="navbar__logo"><img src="/cyclops/img/cyclops_logo-dark.png" alt="CyclOps Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/cyclops/img/cyclops_logo-dark.png" alt="CyclOps Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate"></b></a><a href="https://vectorinstitute.github.io/cyclops/api" target="_self" rel="noopener noreferrer" class="navbar__item navbar__link">API</a><a href="https://vectorinstitute.github.io/cyclops/api/tutorials" target="_self" rel="noopener noreferrer" class="navbar__item navbar__link">Tutorial</a><a class="navbar__item navbar__link" href="/cyclops/blog">Blog</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/VectorInstitute/cyclops" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="navbarSearchContainer_Bca1"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><main class="container margin-vert--xl"><div class="row"><div class="col col--6 col--offset-3"><h1 class="hero__title">Page Not Found</h1><p>We could not find what you were looking for.</p><p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</p></div></div></main></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://vectorinstitute.github.io/cyclops/api" target="_self" rel="noopener noreferrer" class="footer__link-item">API</a></li><li class="footer__item"><a href="https://vectorinstitute.github.io/cyclops/api/tutorials" target="_self" rel="noopener noreferrer" class="footer__link-item">Tutorial</a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/cyclops/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/VectorInstitute/cyclops" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2023 CyclOps, built by AI Engineering @ Vector Institute</div></div></div></footer></div>
Expand Down
20 changes: 17 additions & 3 deletions api/_modules/cyclops/data/slicer.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ <h1>Source code for cyclops.data.slicer</h1><div class="highlight"><pre>
<span class="sd"> ... {</span>
<span class="sd"> ... &quot;feature_1&quot;: {&quot;value&quot;: &quot;value_1&quot;},</span>
<span class="sd"> ... &quot;feature_2&quot;: {</span>
<span class="sd"> ... &quot;min_value&quot;: &quot;2020-01-01&quot;, keep_nulls: False,</span>
<span class="sd"> ... &quot;min_value&quot;: &quot;2020-01-01&quot;, &quot;keep_nulls&quot;: False,</span>
<span class="sd"> ... },</span>
<span class="sd"> ... &quot;feature_3&quot;: {&quot;year&quot;: [&quot;2000&quot;, &quot;2010&quot;, &quot;2020&quot;]},</span>
<span class="sd"> ... },</span>
Expand All @@ -288,8 +288,22 @@ <h1>Source code for cyclops.data.slicer</h1><div class="highlight"><pre>
<span class="sd"> &gt;&gt;&gt; for slice_name, slice_func in slice_spec.slices():</span>
<span class="sd"> ... print(slice_name)</span>
<span class="sd"> ... # do something with slice_func here (e.g. dataset.filter(slice_func))</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="sd"> feature_1:non_null</span>
<span class="sd"> feature_2:non_null&amp;feature_3:non_null</span>
<span class="sd"> feature_1:value_1</span>
<span class="sd"> feature_1:value_1, value_2</span>
<span class="sd"> !(feature_1:value_1)</span>
<span class="sd"> feature_1:[2020-01-01 - 2020-12-31]</span>
<span class="sd"> feature_1:(5 - 60)</span>
<span class="sd"> feature_1:year=[2020, 2021, 2022]</span>
<span class="sd"> feature_1:month=[6, 7, 8]</span>
<span class="sd"> feature_1:month=6, day=1</span>
<span class="sd"> feature_1:contains value_1</span>
<span class="sd"> feature_1:contains [&#39;value_1&#39;, &#39;value_2&#39;]</span>
<span class="sd"> feature_1:value_1&amp;feature_2:[2020-01-01 - inf]&amp;feature_3:year=[&#39;2000&#39;, &#39;2010&#39;, &#39;2020&#39;]</span>
<span class="sd"> overall</span>

<span class="sd"> &quot;&quot;&quot;</span> <span class="c1"># noqa: W505</span>

<span class="n">spec_list</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]]]</span> <span class="o">=</span> <span class="n">field</span><span class="p">(</span>
<span class="n">default_factory</span><span class="o">=</span><span class="k">lambda</span><span class="p">:</span> <span class="p">[{}],</span>
Expand Down
20 changes: 10 additions & 10 deletions api/_modules/cyclops/monitor/clinical_applicator.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ <h1>Source code for cyclops.monitor.clinical_applicator</h1><div class="highligh
<span class="sd"> The source and target datasets are then generated by splitting</span>
<span class="sd"> the original dataset along the categorical feature.</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; from cyclops.monitor.clinical_applicator import ClinicalShiftApplicator</span>
<span class="sd"> &gt;&gt;&gt; from cyclops.data.utils import load_nih</span>
<span class="sd"> &gt;&gt;&gt; ds = load_nih(path=&quot;/mnt/data/nihcxr&quot;)</span>
<span class="sd"> &gt;&gt;&gt; applicator = ClinicalShiftApplicator(&quot;hospital_type&quot;,</span>
<span class="sd"> source = [&quot;hospital_type_1&quot;, &quot;hospital_type_2&quot;]</span>
<span class="sd"> target = [&quot;hospital_type_3&quot;, &quot;hospital_type_4&quot;, &quot;hospital_type_5&quot;]</span>
<span class="sd"> )</span>
<span class="sd"> &gt;&gt;&gt; ds_source, ds_target = applicator.apply_shift(ds)</span>
<span class="sd"> # Examples</span>
<span class="sd"> # --------</span>
<span class="sd"> # &gt;&gt;&gt; from cyclops.monitor.clinical_applicator import ClinicalShiftApplicator</span>
<span class="sd"> # &gt;&gt;&gt; from cyclops.data.loader import load_nihcxr</span>
<span class="sd"> # &gt;&gt;&gt; ds = load_nihcxr(path=&quot;/mnt/data/nihcxr&quot;)</span>
<span class="sd"> # &gt;&gt;&gt; applicator = ClinicalShiftApplicator(&quot;hospital_type&quot;,</span>
<span class="sd"> # source = [&quot;hospital_type_1&quot;, &quot;hospital_type_2&quot;]</span>
<span class="sd"> # target = [&quot;hospital_type_3&quot;, &quot;hospital_type_4&quot;, &quot;hospital_type_5&quot;]</span>
<span class="sd"> # )</span>
<span class="sd"> # &gt;&gt;&gt; ds_source, ds_target = applicator.apply_shift(ds)</span>


<span class="sd"> Parameters</span>
Expand Down
16 changes: 8 additions & 8 deletions api/_modules/cyclops/monitor/synthetic_applicator.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ <h1>Source code for cyclops.monitor.synthetic_applicator</h1><div class="highlig
<span class="k">class</span> <span class="nc">SyntheticShiftApplicator</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;The SyntheticShiftApplicator class is used induce synthetic dataset shift.</span>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; from drift_detection.experimenter import Experimenter</span>
<span class="sd"> &gt;&gt;&gt; from sklearn.datasets import load_diabetes</span>
<span class="sd"> &gt;&gt;&gt; X, y = load_diabetes(return_X_y=True)</span>
<span class="sd"> &gt;&gt;&gt; X_tr, X_te, y_tr, y_te = train_test_split(X, y, test_size=0.5, random_state=42)</span>
<span class="sd"> &gt;&gt;&gt; applicator = SyntheticShiftApplicator(shift_type=&quot;gn_shift&quot;)</span>
<span class="sd"> &gt;&gt;&gt; X_shift = applicator.apply_shift(X_train, noise_amt=0.1, delta=0.1)</span>
<span class="sd"> # Examples</span>
<span class="sd"> # --------</span>
<span class="sd"> # &gt;&gt;&gt; from sklearn.datasets import load_diabetes</span>
<span class="sd"> # &gt;&gt;&gt; X, y = load_diabetes(return_X_y=True)</span>
<span class="sd"> # &gt;&gt;&gt; dataset = Dataset.from_dict({&quot;X&quot;: X, &quot;y&quot;: y})</span>
<span class="sd"> # &gt;&gt;&gt; dataset = dataset.train_test_split(test_size=0.5, seed=42)</span>
<span class="sd"> # &gt;&gt;&gt; applicator = SyntheticShiftApplicator(shift_type=&quot;gn_shift&quot;)</span>
<span class="sd"> # &gt;&gt;&gt; X_shift = applicator.apply_shift(dataset[&quot;test&quot;])</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down
2 changes: 1 addition & 1 deletion api/_modules/cyclops/report/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ <h1>Source code for cyclops.report.report</h1><div class="highlight"><pre>

<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; from cylops.report import ModelCardReport</span>
<span class="sd"> &gt;&gt;&gt; from cyclops.report import ModelCardReport</span>
<span class="sd"> &gt;&gt;&gt; report = ModelCardReport()</span>
<span class="sd"> &gt;&gt;&gt; report.log_descriptor(</span>
<span class="sd"> ... name=&quot;tradeoff&quot;,</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ <h1>cyclops.data.slicer.SliceSpec<a class="headerlink" href="#cyclops-data-slice
<span class="gp">... </span> <span class="p">{</span>
<span class="gp">... </span> <span class="s2">&quot;feature_1&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;value&quot;</span><span class="p">:</span> <span class="s2">&quot;value_1&quot;</span><span class="p">},</span>
<span class="gp">... </span> <span class="s2">&quot;feature_2&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="gp">... </span> <span class="s2">&quot;min_value&quot;</span><span class="p">:</span> <span class="s2">&quot;2020-01-01&quot;</span><span class="p">,</span> <span class="n">keep_nulls</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
<span class="gp">... </span> <span class="s2">&quot;min_value&quot;</span><span class="p">:</span> <span class="s2">&quot;2020-01-01&quot;</span><span class="p">,</span> <span class="s2">&quot;keep_nulls&quot;</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
<span class="gp">... </span> <span class="p">},</span>
<span class="gp">... </span> <span class="s2">&quot;feature_3&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;2000&quot;</span><span class="p">,</span> <span class="s2">&quot;2010&quot;</span><span class="p">,</span> <span class="s2">&quot;2020&quot;</span><span class="p">]},</span>
<span class="gp">... </span> <span class="p">},</span>
Expand All @@ -346,6 +346,20 @@ <h1>cyclops.data.slicer.SliceSpec<a class="headerlink" href="#cyclops-data-slice
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">slice_name</span><span class="p">,</span> <span class="n">slice_func</span> <span class="ow">in</span> <span class="n">slice_spec</span><span class="o">.</span><span class="n">slices</span><span class="p">():</span>
<span class="gp">... </span> <span class="nb">print</span><span class="p">(</span><span class="n">slice_name</span><span class="p">)</span>
<span class="gp">... </span> <span class="c1"># do something with slice_func here (e.g. dataset.filter(slice_func))</span>
<span class="go">feature_1:non_null</span>
<span class="go">feature_2:non_null&amp;feature_3:non_null</span>
<span class="go">feature_1:value_1</span>
<span class="go">feature_1:value_1, value_2</span>
<span class="go">!(feature_1:value_1)</span>
<span class="go">feature_1:[2020-01-01 - 2020-12-31]</span>
<span class="go">feature_1:(5 - 60)</span>
<span class="go">feature_1:year=[2020, 2021, 2022]</span>
<span class="go">feature_1:month=[6, 7, 8]</span>
<span class="go">feature_1:month=6, day=1</span>
<span class="go">feature_1:contains value_1</span>
<span class="go">feature_1:contains [&#39;value_1&#39;, &#39;value_2&#39;]</span>
<span class="go">feature_1:value_1&amp;feature_2:[2020-01-01 - inf]&amp;feature_3:year=[&#39;2000&#39;, &#39;2010&#39;, &#39;2020&#39;]</span>
<span class="go">overall</span>
</pre></div>
</div>
<p class="rubric">Methods</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,16 @@ <h1>cyclops.monitor.clinical_applicator.ClinicalShiftApplicator<a class="headerl
The shift is induced by splitting along categorical features in the dataset.
The source and target datasets are then generated by splitting
the original dataset along the categorical feature.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cyclops.monitor.clinical_applicator</span> <span class="kn">import</span> <span class="n">ClinicalShiftApplicator</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">cyclops.data.utils</span> <span class="kn">import</span> <span class="n">load_nih</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ds</span> <span class="o">=</span> <span class="n">load_nih</span><span class="p">(</span><span class="n">path</span><span class="o">=</span><span class="s2">&quot;/mnt/data/nihcxr&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">applicator</span> <span class="o">=</span> <span class="n">ClinicalShiftApplicator</span><span class="p">(</span><span class="s2">&quot;hospital_type&quot;</span><span class="p">,</span>
<span class="go"> source = [&quot;hospital_type_1&quot;, &quot;hospital_type_2&quot;]</span>
<span class="go"> target = [&quot;hospital_type_3&quot;, &quot;hospital_type_4&quot;, &quot;hospital_type_5&quot;]</span>
<span class="go"> )</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ds_source</span><span class="p">,</span> <span class="n">ds_target</span> <span class="o">=</span> <span class="n">applicator</span><span class="o">.</span><span class="n">apply_shift</span><span class="p">(</span><span class="n">ds</span><span class="p">)</span>
</pre></div>
</div>
<p># Examples
# ——–
# &gt;&gt;&gt; from cyclops.monitor.clinical_applicator import ClinicalShiftApplicator
# &gt;&gt;&gt; from cyclops.data.loader import load_nihcxr
# &gt;&gt;&gt; ds = load_nihcxr(path=”/mnt/data/nihcxr”)
# &gt;&gt;&gt; applicator = ClinicalShiftApplicator(“hospital_type”,
# source = [“hospital_type_1”, “hospital_type_2”]
# target = [“hospital_type_3”, “hospital_type_4”, “hospital_type_5”]
# )
# &gt;&gt;&gt; ds_source, ds_target = applicator.apply_shift(ds)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
Expand Down
Loading

0 comments on commit b7b6797

Please sign in to comment.