Skip to content

Commit 59042f9

Browse files
committed
Update
1 parent 8e324ff commit 59042f9

Some content is hidden

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

51 files changed

+4498
-2083
lines changed

_downloads/0c5ab177a019d9eb71a5f760ed0b28ec/feature_extraction.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"name": "python",
129129
"nbconvert_exporter": "python",
130130
"pygments_lexer": "ipython3",
131-
"version": "3.9.13"
131+
"version": "3.12.4"
132132
}
133133
},
134134
"nbformat": 4,
Binary file not shown.

_downloads/952ecdb7b594216f970d4c743a7ac511/z_COVID.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
"name": "python",
362362
"nbconvert_exporter": "python",
363363
"pygments_lexer": "ipython3",
364-
"version": "3.9.13"
364+
"version": "3.12.4"
365365
}
366366
},
367367
"nbformat": 4,

_modules/MRCpy/amrc.html

Lines changed: 126 additions & 77 deletions
Large diffs are not rendered by default.

_modules/MRCpy/base_mrc.html

Lines changed: 175 additions & 166 deletions
Large diffs are not rendered by default.

_modules/MRCpy/cmrc.html

Lines changed: 325 additions & 344 deletions
Large diffs are not rendered by default.

_modules/MRCpy/dwgcs.html

Lines changed: 714 additions & 0 deletions
Large diffs are not rendered by default.

_modules/MRCpy/mrc.html

Lines changed: 294 additions & 370 deletions
Large diffs are not rendered by default.

_modules/MRCpy/phi/base_phi.html

Lines changed: 55 additions & 31 deletions
Large diffs are not rendered by default.

_modules/MRCpy/phi/random_fourier_phi.html

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<!DOCTYPE html>
2-
<html class="writer-html5" lang="en">
2+
<html class="writer-html5" lang="en" data-content_root="../../../">
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>MRCpy.phi.random_fourier_phi &mdash; MRCpy 0.1.0 documentation</title>
7-
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
8-
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css" />
9-
<link rel="stylesheet" type="text/css" href="../../../_static/basic.css" />
10-
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery.css" />
11-
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-binder.css" />
12-
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-dataframe.css" />
13-
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-rendered-html.css" />
7+
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=b76e3c8a" />
8+
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
9+
<link rel="stylesheet" type="text/css" href="../../../_static/basic.css?v=fb9458d3" />
10+
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery.css?v=61a4c737" />
11+
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-binder.css?v=f4aeca0c" />
12+
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-dataframe.css?v=2082cf3c" />
13+
<link rel="stylesheet" type="text/css" href="../../../_static/sg_gallery-rendered-html.css?v=1277b6f3" />
1414

1515

1616
<!--[if lt IE 9]>
1717
<script src="../../../_static/js/html5shiv.min.js"></script>
1818
<![endif]-->
1919

20-
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
21-
<script src="../../../_static/jquery.js"></script>
22-
<script src="../../../_static/underscore.js"></script>
23-
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
24-
<script src="../../../_static/doctools.js"></script>
20+
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
21+
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
22+
<script src="../../../_static/documentation_options.js?v=01f34227"></script>
23+
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
24+
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
2525
<script src="../../../_static/js/copybutton.js"></script>
2626
<script src="../../../_static/js/theme.js"></script>
2727
<link rel="index" title="Index" href="../../../genindex.html" />
@@ -93,8 +93,10 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
9393
<span class="kn">from</span> <span class="nn">MRCpy.phi</span> <span class="kn">import</span> <span class="n">BasePhi</span>
9494

9595

96-
<div class="viewcode-block" id="RandomFourierPhi"><a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi">[docs]</a><span class="k">class</span> <span class="nc">RandomFourierPhi</span><span class="p">(</span><span class="n">BasePhi</span><span class="p">):</span>
97-
<span class="sd">&#39;&#39;&#39;</span>
96+
<div class="viewcode-block" id="RandomFourierPhi">
97+
<a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi">[docs]</a>
98+
<span class="k">class</span> <span class="nc">RandomFourierPhi</span><span class="p">(</span><span class="n">BasePhi</span><span class="p">):</span>
99+
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
98100
<span class="sd"> Fourier features</span>
99101

100102
<span class="sd"> Features obtained by approximating the rbf kernel by</span>
@@ -209,7 +211,9 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
209211

210212
<span class="sd"> &#39;&#39;&#39;</span>
211213

212-
<div class="viewcode-block" id="RandomFourierPhi.__init__"><a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.__init__">[docs]</a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">n_classes</span><span class="p">,</span> <span class="n">fit_intercept</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sigma</span><span class="o">=</span><span class="s1">&#39;scale&#39;</span><span class="p">,</span>
214+
<div class="viewcode-block" id="RandomFourierPhi.__init__">
215+
<a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.__init__">[docs]</a>
216+
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">n_classes</span><span class="p">,</span> <span class="n">fit_intercept</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">sigma</span><span class="o">=</span><span class="s1">&#39;scale&#39;</span><span class="p">,</span>
213217
<span class="n">n_components</span><span class="o">=</span><span class="mi">600</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">one_hot</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
214218

215219
<span class="c1"># Call the base class init function.</span>
@@ -220,8 +224,11 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
220224
<span class="bp">self</span><span class="o">.</span><span class="n">n_components</span> <span class="o">=</span> <span class="n">n_components</span>
221225
<span class="bp">self</span><span class="o">.</span><span class="n">random_state</span> <span class="o">=</span> <span class="n">random_state</span></div>
222226

223-
<div class="viewcode-block" id="RandomFourierPhi.fit"><a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.fit">[docs]</a> <span class="k">def</span> <span class="nf">fit</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
224-
<span class="sd">&#39;&#39;&#39;</span>
227+
228+
<div class="viewcode-block" id="RandomFourierPhi.fit">
229+
<a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.fit">[docs]</a>
230+
<span class="k">def</span> <span class="nf">fit</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">,</span> <span class="n">Y</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
231+
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
225232
<span class="sd"> Learns the set of random weights for computing the features.</span>
226233
<span class="sd"> Also, compute the scaling parameter if the value is not given.</span>
227234

@@ -273,8 +280,11 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
273280

274281
<span class="k">return</span> <span class="bp">self</span></div>
275282

276-
<div class="viewcode-block" id="RandomFourierPhi.transform"><a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.transform">[docs]</a> <span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">):</span>
277-
<span class="sd">&#39;&#39;&#39;</span>
283+
284+
<div class="viewcode-block" id="RandomFourierPhi.transform">
285+
<a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.transform">[docs]</a>
286+
<span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">):</span>
287+
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
278288
<span class="sd"> Compute the random Fourier features ((:math:`z(x)`)).</span>
279289

280290
<span class="sd"> Parameters</span>
@@ -298,9 +308,12 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
298308

299309
<span class="k">return</span> <span class="n">X_feat</span></div>
300310

301-
<div class="viewcode-block" id="RandomFourierPhi.rff_sigma"><a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.rff_sigma">[docs]</a> <span class="k">def</span> <span class="nf">rff_sigma</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">):</span>
302311

303-
<span class="sd">&#39;&#39;&#39;</span>
312+
<div class="viewcode-block" id="RandomFourierPhi.rff_sigma">
313+
<a class="viewcode-back" href="../../../generated/MRCpy.phi.RandomFourierPhi.html#MRCpy.phi.RandomFourierPhi.rff_sigma">[docs]</a>
314+
<span class="k">def</span> <span class="nf">rff_sigma</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">X</span><span class="p">):</span>
315+
316+
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
304317
<span class="sd"> Computes the scaling parameter for the fourier features</span>
305318
<span class="sd"> using the heuristic given in the paper &quot;Compact Nonlinear Maps</span>
306319
<span class="sd"> and Circulant Extensions&quot; :ref:`[1] &lt;refpf&gt;`.</span>
@@ -338,7 +351,9 @@ <h1>Source code for MRCpy.phi.random_fourier_phi</h1><div class="highlight"><pre
338351
<span class="c1"># Compute the average distance to the 50th nearest neighbour</span>
339352
<span class="n">sigma</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">average</span><span class="p">(</span><span class="n">distances</span><span class="p">[:,</span> <span class="n">neighbour_ind</span><span class="p">])</span>
340353

341-
<span class="k">return</span> <span class="n">sigma</span></div></div>
354+
<span class="k">return</span> <span class="n">sigma</span></div>
355+
</div>
356+
342357
</pre></div>
343358

344359
</div>

0 commit comments

Comments
 (0)