Skip to content

Commit e39c01a

Browse files
author
Documenter.jl
committed
build based on bc5760c
1 parent 7f283df commit e39c01a

File tree

12 files changed

+44
-35
lines changed

12 files changed

+44
-35
lines changed

dev/api/index.html

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

dev/assets/themes/documenter-dark.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7305,11 +7305,15 @@ html.theme--documenter-dark {
73057305
html.theme--documenter-dark .katex .katex-mathml {
73067306
top: 0;
73077307
right: 0; }
7308+
html.theme--documenter-dark .katex-display, html.theme--documenter-dark mjx-container, html.theme--documenter-dark .MathJax_Display {
7309+
margin: 0.5em 0 !important; }
73087310
html.theme--documenter-dark html {
73097311
-moz-osx-font-smoothing: auto;
73107312
-webkit-font-smoothing: auto; }
73117313
html.theme--documenter-dark #documenter .docs-main > article {
73127314
overflow-wrap: break-word; }
7315+
html.theme--documenter-dark #documenter .docs-main > article .math-container {
7316+
overflow-x: auto; }
73137317
@media screen and (min-width: 1056px) {
73147318
html.theme--documenter-dark #documenter .docs-main {
73157319
max-width: 52rem;

dev/assets/themes/documenter-light.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7277,6 +7277,9 @@ h1:hover .docs-heading-anchor-permalink, h2:hover .docs-heading-anchor-permalink
72777277
top: 0;
72787278
right: 0; }
72797279

7280+
.katex-display, mjx-container, .MathJax_Display {
7281+
margin: 0.5em 0 !important; }
7282+
72807283
html {
72817284
-moz-osx-font-smoothing: auto;
72827285
-webkit-font-smoothing: auto; }
@@ -7287,6 +7290,8 @@ html {
72877290
*/
72887291
#documenter .docs-main > article {
72897292
overflow-wrap: break-word; }
7293+
#documenter .docs-main > article .math-container {
7294+
overflow-x: auto; }
72907295

72917296
@media screen and (min-width: 1056px) {
72927297
#documenter .docs-main {

dev/create_kernel/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Custom Kernels · KernelFunctions</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">KernelFunctions</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../userguide/">User Guide</a></li><li><a class="tocitem" href="../example/">Examples</a></li><li><a class="tocitem" href="../kernels/">Kernel Functions</a></li><li><a class="tocitem" href="../transform/">Transform</a></li><li><a class="tocitem" href="../metrics/">Metrics</a></li><li><a class="tocitem" href="../theory/">Theory</a></li><li class="is-active"><a class="tocitem" href>Custom Kernels</a><ul class="internal"><li><a class="tocitem" href="#Creating-your-own-kernel"><span>Creating your own kernel</span></a></li></ul></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Custom Kernels</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Custom Kernels</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/blob/master/docs/src/create_kernel.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h2 id="Creating-your-own-kernel"><a class="docs-heading-anchor" href="#Creating-your-own-kernel">Creating your own kernel</a><a id="Creating-your-own-kernel-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-your-own-kernel" title="Permalink"></a></h2><p>KernelFunctions.jl contains the most popular kernels already but you might want to make your own!</p><p>Here are a few ways depending on how complicated your kernel is :</p><h3 id="SimpleKernel-for-kernels-function-depending-on-a-metric"><a class="docs-heading-anchor" href="#SimpleKernel-for-kernels-function-depending-on-a-metric">SimpleKernel for kernels function depending on a metric</a><a id="SimpleKernel-for-kernels-function-depending-on-a-metric-1"></a><a class="docs-heading-anchor-permalink" href="#SimpleKernel-for-kernels-function-depending-on-a-metric" title="Permalink"></a></h3><p>If your kernel function is of the form <code>k(x, y) = f(d(x, y))</code> where <code>d(x, y)</code> is a <code>PreMetric</code>, you can construct your custom kernel by defining <code>kappa</code> and <code>metric</code> for your kernel. Here is for example how one can define the <code>SqExponentialKernel</code> again :</p><pre><code class="language-julia">struct MyKernel &lt;: KernelFunctions.SimpleKernel end
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Custom Kernels · KernelFunctions</title><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit">KernelFunctions</span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../userguide/">User Guide</a></li><li><a class="tocitem" href="../example/">Examples</a></li><li><a class="tocitem" href="../kernels/">Kernel Functions</a></li><li><a class="tocitem" href="../transform/">Transform</a></li><li><a class="tocitem" href="../metrics/">Metrics</a></li><li><a class="tocitem" href="../theory/">Theory</a></li><li class="is-active"><a class="tocitem" href>Custom Kernels</a><ul class="internal"><li><a class="tocitem" href="#Creating-your-own-kernel"><span>Creating your own kernel</span></a></li></ul></li><li><a class="tocitem" href="../api/">API</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Custom Kernels</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Custom Kernels</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/blob/master/docs/src/create_kernel.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h2 id="Creating-your-own-kernel"><a class="docs-heading-anchor" href="#Creating-your-own-kernel">Creating your own kernel</a><a id="Creating-your-own-kernel-1"></a><a class="docs-heading-anchor-permalink" href="#Creating-your-own-kernel" title="Permalink"></a></h2><p>KernelFunctions.jl contains the most popular kernels already but you might want to make your own!</p><p>Here are a few ways depending on how complicated your kernel is :</p><h3 id="SimpleKernel-for-kernels-function-depending-on-a-metric"><a class="docs-heading-anchor" href="#SimpleKernel-for-kernels-function-depending-on-a-metric">SimpleKernel for kernels function depending on a metric</a><a id="SimpleKernel-for-kernels-function-depending-on-a-metric-1"></a><a class="docs-heading-anchor-permalink" href="#SimpleKernel-for-kernels-function-depending-on-a-metric" title="Permalink"></a></h3><p>If your kernel function is of the form <code>k(x, y) = f(d(x, y))</code> where <code>d(x, y)</code> is a <code>PreMetric</code>, you can construct your custom kernel by defining <code>kappa</code> and <code>metric</code> for your kernel. Here is for example how one can define the <code>SqExponentialKernel</code> again :</p><pre><code class="language-julia">struct MyKernel &lt;: KernelFunctions.SimpleKernel end
33

44
KernelFunctions.kappa(::MyKernel, d2::Real) = exp(-d2)
55
KernelFunctions.metric(::MyKernel) = SqEuclidean()</code></pre><h3 id="Kernel-for-more-complex-kernels"><a class="docs-heading-anchor" href="#Kernel-for-more-complex-kernels">Kernel for more complex kernels</a><a id="Kernel-for-more-complex-kernels-1"></a><a class="docs-heading-anchor-permalink" href="#Kernel-for-more-complex-kernels" title="Permalink"></a></h3><p>If your kernel does not satisfy such a representation, all you need to do is define <code>(k::MyKernel)(x, y)</code> and inherit from <code>Kernel</code>. For example we recreate here the <code>NeuralNetworkKernel</code></p><pre><code class="language-julia">struct MyKernel &lt;: KernelFunctions.Kernel end
@@ -23,4 +23,4 @@
2323
return MyKernel(x.n, xs.a)
2424
end
2525
return (a = x.a,), reconstruct_mykernel
26-
end</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theory</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Friday 9 October 2020 13:14">Friday 9 October 2020</span>. Using Julia version 1.5.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
26+
end</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theory</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 24 November 2020 11:52">Tuesday 24 November 2020</span>. Using Julia version 1.5.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)