Skip to content

Commit 4aba4d6

Browse files
committed
Deployed b4c56cc with MkDocs version: 1.6.1
1 parent 1b8480d commit 4aba4d6

File tree

6 files changed

+104
-163
lines changed

6 files changed

+104
-163
lines changed

datamining/clustering_datamining/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ <h2 id="bluemath_tk.datamining.kma.KMA" class="doc doc-heading">
779779
(<code>int</code>)
780780
781781
<div class="doc-md-description">
782-
<p>The random seed to use.</p>
782+
<p>The random seed to use as initial datapoint.</p>
783783
</div>
784784
</li>
785785
<li>
@@ -1005,8 +1005,8 @@ <h3 id="bluemath_tk.datamining.kma.KMA.__init__" class="doc doc-heading">
10051005
)
10061006
10071007
<div class="doc-md-description">
1008-
<p>The random seed to use.
1009-
Must be greater or equal to 0.
1008+
<p>The random seed to use as initial datapoint.
1009+
Must be greater or equal to 0 and less than number of datapoints.
10101010
Default is 0.</p>
10111011
</div>
10121012
</li>
@@ -1612,7 +1612,7 @@ <h2 id="bluemath_tk.datamining.som.SOM" class="doc doc-heading">
16121612

16131613

16141614
<h3 id="bluemath_tk.datamining.som.SOM.distance_map" class="doc doc-heading">
1615-
<code class=" language-python"><span class="n">distance_map</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span></code>
1615+
<code class=" language-python"><span class="n">distance_map</span></code>
16161616

16171617
<span class="doc doc-labels">
16181618
<small class="doc doc-label doc-label-property"><code>property</code></small>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,5 @@ <h2 id="project-status">Project status</h2>
168168

169169
<!--
170170
MkDocs version : 1.6.1
171-
Build Date UTC : 2024-12-20 12:01:10.066633+00:00
171+
Build Date UTC : 2025-01-07 15:38:50.198483+00:00
172172
-->

interpolation/rbf_interpolation/index.html

Lines changed: 98 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ <h2 id="bluemath_tk.interpolation.rbf.RBF" class="doc doc-heading">
143143

144144

145145
<p>Radial Basis Function (RBF) interpolation model.</p>
146+
<p>Here, scipy's RBFInterpolator is used to interpolate the data.
147+
https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RBFInterpolator.html</p>
146148

147149

148150
<table class="field-list">
@@ -178,31 +180,72 @@ <h2 id="bluemath_tk.interpolation.rbf.RBF" class="doc doc-heading">
178180
(<code>float</code>)
179181
180182
<div class="doc-md-description">
181-
<p>The minimum difference between the optimal sigma and the minimum and maximum sigma values.</p>
183+
<p>The minimum difference between the optimal sigma and the minimum and maximum
184+
sigma values.</p>
182185
</div>
183186
</li>
184187
<li>
185188
<b><code>kernel</code></b>
186189
(<code>str</code>)
187190
188191
<div class="doc-md-description">
189-
<p>The kernel to use for the RBF model.</p>
192+
<p>Type of RBF. This should be one of</p>
193+
<div class="codehilite"><pre><span></span><code><span class="k">-</span> &#39;linear&#39; : ``-r``
194+
<span class="k">-</span> &#39;thin_plate_spline&#39; : ``r**2 * log(r)``
195+
<span class="k">-</span> &#39;cubic&#39; : ``r**3``
196+
<span class="k">-</span> &#39;quintic&#39; : ``-r**5``
197+
<span class="k">-</span> &#39;multiquadric&#39; : ``-sqrt(1 + r**2)``
198+
<span class="k">-</span> &#39;inverse_multiquadric&#39; : ``1/sqrt(1 + r**2)``
199+
<span class="k">-</span> &#39;inverse_quadratic&#39; : ``1/(1 + r**2)``
200+
<span class="k">-</span> &#39;gaussian&#39; : ``exp(-r**2)``
201+
</code></pre></div>
190202
</div>
191203
</li>
192204
<li>
193-
<b><code>kernel_func</code></b>
194-
(<code>function</code>)
205+
<b><code>smoothing</code></b>
206+
(<code>float or (npoints, ) array_like</code>)
195207
196208
<div class="doc-md-description">
197-
<p>The kernel function to use for the RBF model.</p>
209+
<p>Smoothing parameter. The interpolant perfectly fits the data when this
210+
is set to 0. For large values, the interpolant approaches a least
211+
squares fit of a polynomial with the specified degree.</p>
198212
</div>
199213
</li>
200214
<li>
201-
<b><code>smooth</code></b>
202-
(<code>float</code>)
215+
<b><code>degree</code></b>
216+
(<code>int</code>)
217+
218+
<div class="doc-md-description">
219+
<p>Degree of the added polynomial. For some RBFs the interpolant may not
220+
be well-posed if the polynomial degree is too small. Those RBFs and
221+
their corresponding minimum degrees are</p>
222+
<div class="codehilite"><pre><span></span><code><span class="k">-</span> &#39;multiquadric&#39; : 0
223+
<span class="k">-</span> &#39;linear&#39; : 0
224+
<span class="k">-</span> &#39;thin_plate_spline&#39; : 1
225+
<span class="k">-</span> &#39;cubic&#39; : 1
226+
<span class="k">-</span> &#39;quintic&#39; : 2
227+
</code></pre></div>
228+
229+
<p>The default value is the minimum degree for <code>kernel</code> or 0 if there is
230+
no minimum degree. Set this to -1 for no added polynomial.</p>
231+
</div>
232+
</li>
233+
<li>
234+
<b><code>neighbors</code></b>
235+
(<code>int</code>)
236+
237+
<div class="doc-md-description">
238+
<p>If specified, the value of the interpolant at each evaluation point
239+
will be computed using only this many nearest data points. All the data
240+
points are used by default.</p>
241+
</div>
242+
</li>
243+
<li>
244+
<b><code>rbfs</code></b>
245+
(<code>dict</code>)
203246
204247
<div class="doc-md-description">
205-
<p>The smoothness parameter.</p>
248+
<p>Dict with RBFInterpolator instances.</p>
206249
</div>
207250
</li>
208251
<li>
@@ -334,52 +377,23 @@ <h2 id="bluemath_tk.interpolation.rbf.RBF" class="doc doc-heading">
334377
</thead>
335378
<tbody>
336379
<tr class="doc-section-item">
337-
<td><code><a class="autorefs autorefs-internal" title="bluemath_tk.interpolation.rbf.RBF.fit" href="#bluemath_tk.interpolation.rbf.RBF.fit">fit</a></code></td>
338-
<td>
339-
<div class="doc-md-description">
340-
<p>subset_data: pd.DataFrame,
341-
target_data: pd.DataFrame,
342-
subset_directional_variables: List[str] = [],
343-
target_directional_variables: List[str] = [],
344-
subset_custom_scale_factor: dict = {},
345-
normalize_target_data: bool = True,
346-
target_custom_scale_factor: dict = {},</p>
347-
</div>
348-
</td>
349-
</tr>
350-
<tr class="doc-section-item">
351-
<td><code><span title="bluemath_tk.interpolation.rbf.RBF.) -> None">) -&gt; None</span></code></td>
380+
<td><code><span title="bluemath_tk.interpolation.rbf.RBF.fit : Fits the model to the data.">fit : Fits the model to the data.</span></code></td>
352381
<td>
353382
<div class="doc-md-description">
354383

355384
</div>
356385
</td>
357386
</tr>
358387
<tr class="doc-section-item">
359-
<td><code><a class="autorefs autorefs-internal" title="bluemath_tk.interpolation.rbf.RBF.predict" href="#bluemath_tk.interpolation.rbf.RBF.predict">predict</a></code></td>
388+
<td><code><span title="bluemath_tk.interpolation.rbf.RBF.predict : Predicts the data for the provided dataset.">predict : Predicts the data for the provided dataset.</span></code></td>
360389
<td>
361390
<div class="doc-md-description">
362391

363392
</div>
364393
</td>
365394
</tr>
366395
<tr class="doc-section-item">
367-
<td><code><a class="autorefs autorefs-internal" title="bluemath_tk.interpolation.rbf.RBF.fit_predict" href="#bluemath_tk.interpolation.rbf.RBF.fit_predict">fit_predict</a></code></td>
368-
<td>
369-
<div class="doc-md-description">
370-
<p>subset_data: pd.DataFrame,
371-
target_data: pd.DataFrame,
372-
dataset: pd.DataFrame,
373-
subset_directional_variables: List[str] = [],
374-
target_directional_variables: List[str] = [],
375-
subset_custom_scale_factor: dict = {},
376-
normalize_target_data: bool = True,
377-
target_custom_scale_factor: dict = {},</p>
378-
</div>
379-
</td>
380-
</tr>
381-
<tr class="doc-section-item">
382-
<td><code><span title="bluemath_tk.interpolation.rbf.RBF.) -> pd.DataFrame">) -&gt; pd.DataFrame</span></code></td>
396+
<td><code><span title="bluemath_tk.interpolation.rbf.RBF.fit_predict : Fits the model to the subset and predicts the interpolated dataset.">fit_predict : Fits the model to the subset and predicts the interpolated dataset.</span></code></td>
383397
<td>
384398
<div class="doc-md-description">
385399

@@ -390,9 +404,29 @@ <h2 id="bluemath_tk.interpolation.rbf.RBF" class="doc doc-heading">
390404
</table>
391405

392406

407+
<details class="see-also" open>
408+
<summary>See Also</summary>
409+
<p>OtherInterpolationMethod</p>
410+
</details>
411+
412+
<details class="references" open>
413+
<summary>References</summary>
414+
<p>.. [1] Fasshauer, G., 2007. Meshfree Approximation Methods with Matlab.
415+
World Scientific Publishing Co.</p>
416+
<p>.. [2] http://amadeus.math.iit.edu/~fass/603_ch3.pdf</p>
417+
<p>.. [3] Wahba, G., 1990. Spline Models for Observational Data. SIAM.</p>
418+
<p>.. [4] http://pages.stat.wisc.edu/~wahba/stat860public/lect/lect8/lect8.pdf</p>
419+
</details>
420+
421+
<p><span class="doc-section-title">Examples:</span></p>
422+
<div class="codehilite"><pre><span></span><code><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
423+
</code></pre></div>
424+
425+
393426
<details class="note" open>
394427
<summary>Notes</summary>
395-
<p>TODO: For the moment, this class only supports optimization for one parameter kernels.
428+
<p>.. versionadded:: 1.0.3
429+
TODO: For the moment, this class only supports optimization for one parameter kernels.
396430
For this reason, we only have sigma as the parameter to optimize.
397431
This sigma refers to the sigma parameter in the Gaussian kernel (but is used for all kernels).</p>
398432
</details>
@@ -418,7 +452,7 @@ <h2 id="bluemath_tk.interpolation.rbf.RBF" class="doc doc-heading">
418452

419453

420454
<h3 id="bluemath_tk.interpolation.rbf.RBF.__init__" class="doc doc-heading">
421-
<code class=" language-python"><span class="fm">__init__</span><span class="p">(</span><span class="n">sigma_min</span><span class="o">=</span><span class="mf">0.001</span><span class="p">,</span> <span class="n">sigma_max</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">sigma_diff</span><span class="o">=</span><span class="mf">0.0001</span><span class="p">,</span> <span class="n">kernel</span><span class="o">=</span><span class="s1">&#39;gaussian&#39;</span><span class="p">,</span> <span class="n">smooth</span><span class="o">=</span><span class="mf">1e-05</span><span class="p">)</span></code>
455+
<code class=" language-python"><span class="fm">__init__</span><span class="p">(</span><span class="n">sigma_min</span><span class="o">=</span><span class="mf">0.001</span><span class="p">,</span> <span class="n">sigma_max</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">sigma_diff</span><span class="o">=</span><span class="mf">0.0001</span><span class="p">,</span> <span class="n">kernel</span><span class="o">=</span><span class="s1">&#39;gaussian&#39;</span><span class="p">,</span> <span class="n">smoothing</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">degree</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">neighbors</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span></code>
422456

423457
</h3>
424458

@@ -465,8 +499,8 @@ <h3 id="bluemath_tk.interpolation.rbf.RBF.__init__" class="doc doc-heading">
465499
)
466500
467501
<div class="doc-md-description">
468-
<p>The minimum difference between the optimal sigma and the minimum and maximum sigma values.
469-
Default is 0.0001.</p>
502+
<p>The minimum difference between the optimal sigma and the minimum and maximum
503+
sigma values. Default is 0.0001.</p>
470504
</div>
471505
</li>
472506
<li>
@@ -476,50 +510,38 @@ <h3 id="bluemath_tk.interpolation.rbf.RBF.__init__" class="doc doc-heading">
476510
)
477511
478512
<div class="doc-md-description">
479-
<p>The kernel to use for the RBF model. Default is "gaussian".
480-
The available kernels are:
481-
- "gaussian": Gaussian kernel.
482-
- "multiquadratic": Multiquadratic kernel.
483-
- "inverse": Inverse kernel.
484-
- "cubic": Cubic kernel.
485-
- "thin_plate": Thin plate kernel.</p>
513+
<p>Type of RBF. Default is 'gaussian'.</p>
486514
</div>
487515
</li>
488516
<li>
489-
<b><code>smooth</code></b>
517+
<b><code>smoothing</code></b>
490518
(<code>float</code>, default:
491-
<code>1e-05</code>
519+
<code>0.0</code>
492520
)
493521
494522
<div class="doc-md-description">
495-
<p>The smoothness parameter. Default is 1e-5.</p>
523+
<p>Smoothing parameter. Default is 0.0.</p>
496524
</div>
497525
</li>
498-
</ul>
499-
</td>
500-
</tr>
501-
</tbody>
502-
</table>
503-
504-
<table class="field-list">
505-
<colgroup>
506-
<col class="field-name" />
507-
<col class="field-body" />
508-
</colgroup>
509-
<tbody valign="top">
510-
<tr class="field">
511-
<th class="field-name">Raises:</th>
512-
<td class="field-body">
513-
<ul class="first simple">
514526
<li>
515-
<code>ValueError</code>
527+
<b><code>degree</code></b>
528+
(<code>int</code>, default:
529+
<code>None</code>
530+
)
531+
532+
<div class="doc-md-description">
533+
<p>Degree of the added polynomial. Default is None.</p>
534+
</div>
535+
</li>
536+
<li>
537+
<b><code>neighbors</code></b>
538+
(<code>int</code>, default:
539+
<code>None</code>
540+
)
516541
517542
<div class="doc-md-description">
518-
<p>If the sigma_min is not a positive float.
519-
If the sigma_max is not a positive float greater than sigma_min.
520-
If the sigma_diff is not a positive float.
521-
If the kernel is not a string and one of the available kernels.
522-
If the smooth is not a positive float.</p>
543+
<p>If specified, the value of the interpolant at each evaluation point will be
544+
computed using only this many nearest data points. Default is None.</p>
523545
</div>
524546
</li>
525547
</ul>
@@ -952,87 +974,6 @@ <h2 id="bluemath_tk.interpolation.rbf.RBFError" class="doc doc-heading">
952974
</div>
953975

954976

955-
<div class="doc doc-object doc-function">
956-
957-
958-
<h2 id="bluemath_tk.interpolation.rbf.gaussian_kernel" class="doc doc-heading">
959-
<code class=" language-python"><span class="n">gaussian_kernel</span><span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="n">const</span><span class="p">)</span></code>
960-
961-
</h2>
962-
963-
964-
<div class="doc doc-contents ">
965-
966-
<p>This function calculates the Gaussian kernel for the given distance and constant.</p>
967-
968-
969-
<table class="field-list">
970-
<colgroup>
971-
<col class="field-name" />
972-
<col class="field-body" />
973-
</colgroup>
974-
<tbody valign="top">
975-
<tr class="field">
976-
<th class="field-name">Parameters:</th>
977-
<td class="field-body">
978-
<ul class="first simple">
979-
<li>
980-
<b><code>r</code></b>
981-
(<code>float</code>)
982-
983-
<div class="doc-md-description">
984-
<p>The distance.</p>
985-
</div>
986-
</li>
987-
<li>
988-
<b><code>const</code></b>
989-
(<code>float</code>)
990-
991-
<div class="doc-md-description">
992-
<p>The constant (default name is usually sigma for gaussian kernel).</p>
993-
</div>
994-
</li>
995-
</ul>
996-
</td>
997-
</tr>
998-
</tbody>
999-
</table>
1000-
1001-
<table class="field-list">
1002-
<colgroup>
1003-
<col class="field-name" />
1004-
<col class="field-body" />
1005-
</colgroup>
1006-
<tbody valign="top">
1007-
<tr class="field">
1008-
<th class="field-name">Returns:</th>
1009-
<td class="field-body">
1010-
<ul class="first simple">
1011-
<li>
1012-
<code>float</code>
1013-
1014-
<div class="doc-md-description">
1015-
<p>The Gaussian kernel value.</p>
1016-
</div>
1017-
</li>
1018-
</ul>
1019-
</td>
1020-
</tr>
1021-
</tbody>
1022-
</table>
1023-
1024-
<details class="note" open>
1025-
<summary>Notes</summary>
1026-
<ul>
1027-
<li>The Gaussian kernel is defined as:
1028-
K(r) = exp(r^2 / 2 * const^2) (https://en.wikipedia.org/wiki/Gaussian_function)</li>
1029-
<li>Here, we are assuming the mean is 0.</li>
1030-
</ul>
1031-
</details>
1032-
</div>
1033-
1034-
</div>
1035-
1036977

1037978

1038979
</div>

objects.inv

-12 Bytes
Binary file not shown.

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)