<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "https://jats.nlm.nih.gov/nlm-dtd/publishing/3.0/journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0" article-type="research-article"><?xmltex \bartext{Methods for assessment of models}?>
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-16-6609-2023</article-id><title-group><article-title>A diffusion-based kernel density estimator (diffKDE, version 1) with optimal bandwidth approximation for the analysis of data in geoscience and ecological research</article-title><alt-title>A diffusion-based kernel density estimator</alt-title>
      </title-group><?xmltex \runningtitle{A diffusion-based kernel density estimator}?><?xmltex \runningauthor{M.-T.~Pelz~et~al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2">
          <name><surname>Pelz</surname><given-names>Maria-Theresia</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-0976-3501</ext-link></contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff2">
          <name><surname>Schartau</surname><given-names>Markus</given-names></name>
          <email>mschartau@geomar.de</email>
        <ext-link>https://orcid.org/0000-0003-1114-0415</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Somes</surname><given-names>Christopher J.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-2635-7617</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Lampe</surname><given-names>Vanessa</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-0479-8991</ext-link></contrib>
        <contrib contrib-type="author" corresp="yes" rid="aff1">
          <name><surname>Slawig</surname><given-names>Thomas</given-names></name>
          <email>thomas.slawig@email.uni-kiel.de</email>
        <ext-link>https://orcid.org/0000-0002-1266-3181</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Department of Computer Science, Kiel University, 24118 Kiel, Germany</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Research Unit Biogeochemical Modelling, GEOMAR Helmholtz Centre for Ocean Research Kiel, 24105 Kiel, Germany</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Markus Schartau (mschartau@geomar.de) and Thomas Slawig (thomas.slawig@email.uni-kiel.de)</corresp></author-notes><pub-date><day>16</day><month>November</month><year>2023</year></pub-date>
      
      <volume>16</volume>
      <issue>22</issue>
      <fpage>6609</fpage><lpage>6634</lpage>
      <history>
        <date date-type="received"><day>2</day><month>February</month><year>2023</year></date>
           <date date-type="accepted"><day>18</day><month>September</month><year>2023</year></date>
           <date date-type="rev-recd"><day>13</day><month>September</month><year>2023</year></date>
           <date date-type="rev-request"><day>13</day><month>February</month><year>2023</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2023 Maria-Theresia Pelz et al.</copyright-statement>
        <copyright-year>2023</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023.html">This article is available from https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d1e126">Probability density functions (PDFs) provide information about the probability of a random variable taking on a specific value. In geoscience, data distributions are often expressed by a parametric estimation of their PDF, such as, for example, a Gaussian distribution. At present there is growing attention towards the analysis of non-parametric estimation of PDFs, where no prior assumptions about the type of PDF are required. A common tool for such non-parametric estimation is a kernel density estimator (KDE). Existing KDEs are valuable but problematic because of the difficulty of objectively specifying optimal bandwidths for the individual kernels. In this study, we designed and developed a new implementation of a diffusion-based KDE as an open source Python tool to make diffusion-based KDE accessible for general use. Our new diffusion-based KDE provides (1) consistency at the boundaries, (2) better resolution of multimodal data, and (3) a family of KDEs with different smoothing intensities. We demonstrate our tool on artificial data with multiple and boundary-close modes and on real marine biogeochemical data, and compare our results against other popular KDE methods. We also provide an example for how our approach can be efficiently utilized for the derivation of plankton size spectra in ecological research. Our estimator is able to detect relevant multiple modes and it resolves modes that are located closely to a boundary of the observed data interval. Furthermore, our approach produces a smooth graph that is robust to noise and outliers. The convergence rate is comparable to that of the Gaussian estimator, but with a generally smaller error. This is most notable for small data sets with up to around 5000 data points. We discuss the general applicability and advantages of such KDEs for data–model comparison in geoscience.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e138">In geoscience, the application of numerical models has become an integral part of research. Given the complexity of some models, such as earth system models with their descriptions of detailed processes in the ocean, atmosphere, and land, a number of plausible model solutions may exist. Accordingly, there is a strong demand for the analysis of model simulations on various temporal and spatial scales and to evaluate these results against observational data. A viable evaluation procedure is to compare non-parametric probability density functions (PDFs) of the data with their simulated counterparts. By non-parametric PDFs, it is meant that no assumptions are made regarding any particular (parametric) probability distribution, such as the normal distribution.</p>
      <p id="d1e141">Some studies have already documented the advantage of analyzing changes in PDFs, for example, when results of climate models are evaluated on a regional scale and their sensitivities to uncertainties in model parameterizations and forcing are examined <xref ref-type="bibr" rid="bib1.bibx13 bib1.bibx42" id="paren.1"><named-content content-type="pre">e.g.,</named-content></xref>. Likewise, problems of model parameterizations can be approached in a stochastic rather than deterministic framework, which requires a simulated probability distribution to compare well with the probability distribution of truth <xref ref-type="bibr" rid="bib1.bibx36" id="paren.2"/>. <xref ref-type="bibr" rid="bib1.bibx42" id="text.3"/> stressed that the credibility of projecting future distributions of temperature and<?pagebreak page6610?> precipitation is more likely to be good in cases when the PDFs of hindcast simulation results are similar to the PDFs of the observations. A critical point is the quantification of the similarity between respective non-parametric PDFs, typically expressed by some distance or divergence measure, as analyzed and discussed in <xref ref-type="bibr" rid="bib1.bibx59" id="text.4"/>.</p>
      <p id="d1e158">The examination of the suitability of certain divergence functions for data–model assessment is only one aspect; another is the quality or representativeness of the estimated PDFs. Well-approximated PDFs have been used to benefit data analysis in the geosciences <xref ref-type="bibr" rid="bib1.bibx33 bib1.bibx58 bib1.bibx35" id="paren.5"><named-content content-type="pre">e.g.,</named-content></xref>. Obtaining high-quality approximations of non-parametric PDFs is certainly not limited to applications in the geosciences but is likely desirable in other scientific fields as well. In aquatic ecological research, for example, continuous plankton size spectra can be well derived from PDFs of cell size measurements sorted by individual species or plankton groups <xref ref-type="bibr" rid="bib1.bibx44 bib1.bibx49 bib1.bibx26" id="paren.6"><named-content content-type="pre">e.g.,</named-content></xref>. The identification of structural details in the size spectra, such as distinct elevations (modes) and troughs within certain size ranges, is useful, since they can reveal some of the underlying structure of the plankton foodweb. A typical limitation of the approach described in <xref ref-type="bibr" rid="bib1.bibx49" id="text.7"/> and <xref ref-type="bibr" rid="bib1.bibx26" id="text.8"/> is the specification of an estimator for the continuous size spectra, such that all significant details are well resolved.</p>
      <p id="d1e177">Mathematically formulated, PDFs are integrable non-negative functions <inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>:</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>→</mml:mo><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> from a sample space <inline-formula><mml:math id="M2" display="inline"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>⊆</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> into the non-negative real numbers with <inline-formula><mml:math id="M3" display="inline"><mml:mrow><mml:msubsup><mml:mo>∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="normal">∞</mml:mi></mml:msubsup><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>. PDFs correspond to the probability <inline-formula><mml:math id="M4" display="inline"><mml:mi>P</mml:mi></mml:math></inline-formula> of the occurrence of a data value <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mi>X</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> within a specific range <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mi>b</mml:mi><mml:mo>]</mml:mo><mml:mo>⊆</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> via the relationship
          <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M7" display="block"><mml:mrow><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>a</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>X</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>b</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mi>a</mml:mi><mml:mi>b</mml:mi></mml:munderover><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mtext> for all </mml:mtext><mml:mi>a</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>b</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e347">The application of kernel density estimators (KDEs) has become a common approach for approximating PDFs in a <italic>non-parametric</italic> way <xref ref-type="bibr" rid="bib1.bibx38" id="paren.9"/>, which means that probability parameters (e.g., expectation or variance) of the data and the type of the underlying probability distribution (e.g., normal or lognormal) are not prescribed. The general concept of KDEs takes into account information of every single data point and treats all of them equally. Consequently, every point's information weighs the same in the resulting estimate without introducing additional assumptions.</p>
      <p id="d1e356">A KDE is based on a kernel function and a smoothing parameter. The kernel function is ideally chosen to be a PDF itself, usually unimodal and centered around zero <xref ref-type="bibr" rid="bib1.bibx53" id="paren.10"/>. The estimation process sums up the kernel function sequentially centered around each data point. The sum of these individual kernels is standardized by the number of data points. This ensures that the final estimate is again a PDF by inheriting all properties of its kernels. The smoothing parameter, referred to as bandwidth, determines the smoothness of the estimate. If it is chosen to be small, more details of the underlying data structure become visible. If it is larger, more structure becomes smoothed out <xref ref-type="bibr" rid="bib1.bibx23" id="paren.11"/> and information from single data points can get lost. Hence, it is crucial to determine some kind of an optimal size of the bandwidth parameter to represent a suitable signal-to-noise ratio that allows a separation of significant distinctive features from ambiguous details. The question of optimal bandwidth selection is widely discussed in the literature <xref ref-type="bibr" rid="bib1.bibx54 bib1.bibx23 bib1.bibx19 bib1.bibx7 bib1.bibx17" id="paren.12"><named-content content-type="pre">e.g.,</named-content></xref>. It also takes into account that there might not be one single “optimal” choice for such bandwidth <xref ref-type="bibr" rid="bib1.bibx1 bib1.bibx57 bib1.bibx8 bib1.bibx52" id="paren.13"/>, to use adaptive bandwidth approaches <xref ref-type="bibr" rid="bib1.bibx10" id="paren.14"/> or to optimize the kernel function shape instead of the bandwidth <xref ref-type="bibr" rid="bib1.bibx3" id="paren.15"/>.</p>
      <p id="d1e380">The reformulation of the most common Gaussian KDEs <xref ref-type="bibr" rid="bib1.bibx53" id="paren.16"/> into a diffusion equation provides a different view on KDE <xref ref-type="bibr" rid="bib1.bibx8" id="paren.17"/>. This different approach comes with three main advantages: (1) consistency at the boundaries, (2) better resolution of multimodal data, and (3) a family of KDEs with different smoothing intensities which can be produced as a by-product of the numerical solution. This perspective change is possible because the Gaussian kernel function solves the partial differential equation describing the diffusion heat process as the Green function. The time parameter of this differential equation corresponds to the smoothness of the estimate and thus becomes tantamount to the estimate's bandwidth parameter <xref ref-type="bibr" rid="bib1.bibx8" id="paren.18"/>. The initial value is typically set to include the <inline-formula><mml:math id="M8" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution of the input data, which will formally be defined in Sect. <xref ref-type="sec" rid="Ch1.S3"/>. This differentiates the initial value problem from classical problems, since the <inline-formula><mml:math id="M9" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution is not a proper function itself. In specific applications this diffusion approach delivered convincing results <xref ref-type="bibr" rid="bib1.bibx5 bib1.bibx12 bib1.bibx43" id="paren.19"><named-content content-type="pre">e.g.,</named-content></xref>, especially for the resolution of multiple modes <xref ref-type="bibr" rid="bib1.bibx29" id="paren.20"><named-content content-type="pre">e.g.,</named-content></xref>. The improved structure resolution has, for example, already shown useful for the optimization of photovoltaic power generation <xref ref-type="bibr" rid="bib1.bibx27" id="paren.21"/>, analysis of flood frequencies <xref ref-type="bibr" rid="bib1.bibx46" id="paren.22"/>, or the prediction of wind speed <xref ref-type="bibr" rid="bib1.bibx66" id="paren.23"/>. However, it tends to resolve too many details or overfit the data in others <xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx8 bib1.bibx15" id="paren.24"><named-content content-type="pre">e.g.,</named-content></xref>. One main benefit of the diffusion KDE is that it provides a series of PDF estimates for a sequence of bandwidths by default <xref ref-type="bibr" rid="bib1.bibx8" id="paren.25"/>. As a consequence, it offers the chance to choose between varying levels of smoothness by design.</p>
      <?pagebreak page6611?><p id="d1e437">In this study, we present a new, modified diffusion-based KDE with an accompanying Python package, diffKDE <xref ref-type="bibr" rid="bib1.bibx41" id="paren.26"/>. Our aim is to retain the original idea of diffusion-based KDEs by <xref ref-type="bibr" rid="bib1.bibx8" id="text.27"/> and <xref ref-type="bibr" rid="bib1.bibx5" id="text.28"/>, but to avoid the complex fixed-point iteration by <xref ref-type="bibr" rid="bib1.bibx5" id="text.29"/>. The main objective of our refined approach is to achieve high performance for analyses of high variance and multimodal data sets. Our diffusion-based KDE is based on an iterative approximation that differs from others, using a default optimal bandwidth and two preliminary <italic>pilot</italic> estimates. This way the KDE can provide a family of estimates at different bandwidths to choose from, in addition to a default solution optimally designed for data from geoscience and ecological research. This allows for an interactive investigation of estimated densities at different smoothing intensities.</p>
      <p id="d1e455">This paper is structured as follows: first, we will briefly summarize the general concept of KDEs. Afterwards, our specific KDE approach will be introduced and described, as developed and implemented in our software package. We explain the two pilot estimation steps and the selection of the smoothing parameters. Then the performance of our refined estimator will be compared with other state-of-the-art KDEs while considering known distributions and real marine biogeochemical data. The real test data include carbon isotope ratios of particulate organic matter (<inline-formula><mml:math id="M10" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and plankton size data. Our analyses presented here involve investigations of KDE error, runtime, the sensitivity to data noise, and the characteristics of convergence with respect to increasing sample size.</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>The general kernel density estimator</title>
      <p id="d1e482">A kernel density estimator is a non-parametric statistical tool for the estimation of PDFs. In practice, diverse specifications of KDEs exist that may improve the performance with respect to individual needs. Before we explain our specifications of the diffusion-based KDE, we will provide basic background information about KDEs.</p>
      <p id="d1e485">From now on, let <inline-formula><mml:math id="M11" display="inline"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>⊆</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> be a domain and <inline-formula><mml:math id="M12" display="inline"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M13" display="inline"><mml:mrow><mml:mi>j</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>, be <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula> independent identically distributed real random variables.</p>
      <p id="d1e551">The most general form of a KDE approximates the true density <inline-formula><mml:math id="M15" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> of the input data <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> by
          <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M17" display="block"><mml:mrow><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mi>N</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:mi>K</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where <inline-formula><mml:math id="M18" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>,  <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e714">The sets <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M22" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> denote the positive real numbers and the non-negative real numbers, respectively. The <italic>kernel function</italic> <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:mi>K</mml:mi><mml:mo>:</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> satisfies the following conditions <xref ref-type="bibr" rid="bib1.bibx38" id="paren.30"/>:
          <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M24" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:munder><mml:mo movablelimits="false">sup⁡</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:munder><mml:mfenced open="|" close="|"><mml:mrow><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:mfenced close="|" open="|"><mml:mrow><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:munder><mml:mo movablelimits="false">lim⁡</mml:mo><mml:mrow><mml:mi>y</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:munder><mml:mfenced open="|" close="|"><mml:mrow><mml:mi>y</mml:mi><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        meaning that <inline-formula><mml:math id="M25" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> is bounded, integrable, and for the limit <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:mi>y</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula> decreases faster to zero than <inline-formula><mml:math id="M27" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> approaches infinity. The final condition means that <inline-formula><mml:math id="M28" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> integrates to <inline-formula><mml:math id="M29" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> over the whole real domain, which implies that also the KDE <inline-formula><mml:math id="M30" display="inline"><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:math></inline-formula> integrates to <inline-formula><mml:math id="M31" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> as is necessary for a PDF.</p>
      <p id="d1e953">The parameter <inline-formula><mml:math id="M32" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> determines the smoothness of the estimate calculated by Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) and is called the <italic>bandwidth parameter</italic>
<xref ref-type="bibr" rid="bib1.bibx55" id="paren.31"/>. An optimal choice for the bandwidth parameter is regarded as the minimizer of the asymptotic mean integrated squared error between the true density of <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and their KDE <xref ref-type="bibr" rid="bib1.bibx54" id="paren.32"/>. The mean integrated squared error (<inline-formula><mml:math id="M34" display="inline"><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow></mml:math></inline-formula>) is defined as
          <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M35" display="block"><mml:mrow><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mo>(</mml:mo><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi mathvariant="bold">E</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where <inline-formula><mml:math id="M36" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> for all PDFs <inline-formula><mml:math id="M37" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> and respective KDEs <inline-formula><mml:math id="M38" display="inline"><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx51" id="paren.33"/>. In the following, we will work with the asymptotic <inline-formula><mml:math id="M39" display="inline"><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow></mml:math></inline-formula> denoted as <inline-formula><mml:math id="M40" display="inline"><mml:mrow class="chem"><mml:mi mathvariant="normal">AMISE</mml:mi></mml:mrow></mml:math></inline-formula>, which describes the asymptotic behavior of the <inline-formula><mml:math id="M41" display="inline"><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow></mml:math></inline-formula> for the bandwidth parameter approaching zero <inline-formula><mml:math id="M42" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, meaning
          <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M43" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">lim⁡</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mo>(</mml:mo><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mrow class="chem"><mml:mi mathvariant="normal">AMISE</mml:mi></mml:mrow><mml:mo>(</mml:mo><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <?pagebreak page6612?><p id="d1e1216">If now <inline-formula><mml:math id="M44" display="inline"><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:math></inline-formula> is a KDE and there exists a <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> with
          <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M46" display="block"><mml:mrow><mml:mrow class="chem"><mml:mi mathvariant="normal">AMISE</mml:mi></mml:mrow><mml:mo>(</mml:mo><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:msup><mml:mi>h</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">min⁡</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:munder><mml:mrow class="chem"><mml:mi mathvariant="normal">AMISE</mml:mi></mml:mrow><mml:mo>(</mml:mo><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        we call <inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> the <italic>optimal bandwidth</italic> of <inline-formula><mml:math id="M48" display="inline"><mml:mover accent="true"><mml:mi>f</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:math></inline-formula> by <inline-formula><mml:math id="M49" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx51" id="paren.34"/>. A kernel function <inline-formula><mml:math id="M50" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> that suffices the additional conditions
          <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M51" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:mi>y</mml:mi><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:msup><mml:mi>y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:msup><mml:mi>y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo mathvariant="italic">}</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        is a second-order kernel as its second moment <inline-formula><mml:math id="M52" display="inline"><mml:mrow><mml:msub><mml:mo>∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:msub><mml:msup><mml:mi>y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi></mml:mrow></mml:math></inline-formula> is its first non-zero moment. Those kernels are positive and together with the final condition from Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>) are PDFs themselves. For the general KDE from Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) with a second-order kernel, the optimal bandwidth can be calculated as
          <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M53" display="block"><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:mi>K</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msubsup><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e1605">This result was already obtained by <xref ref-type="bibr" rid="bib1.bibx38" id="text.35"/> and is discussed in more detail in Appendix <xref ref-type="sec" rid="App1.Ch1.S1"/>.</p>
      <p id="d1e1613">In Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>), the true density <inline-formula><mml:math id="M54" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> is involved in the calculation of the optimal bandwidth <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, which is in turn needed for the approximation of <inline-formula><mml:math id="M56" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> by a KDE and thus prevents a direct derivation of an optimal bandwidth. One possibility of how this implicit relation can be solved is the calculation of pilot estimation steps. Our specific approach to this is shown in Sects. <xref ref-type="sec" rid="Ch1.S3.SS1"/> and <xref ref-type="sec" rid="Ch1.S3.SS2"/>.</p>
      <p id="d1e1648">There exists a variety of available choices for the type of kernel function <inline-formula><mml:math id="M57" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula>, which all have their individual benefits and shortcomings. Among these choices are, for example, the uniform, triangle, or the Epanechnikov kernel <xref ref-type="bibr" rid="bib1.bibx51" id="paren.36"/>:
          <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M58" display="block"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">3</mml:mn><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msup><mml:mi>w</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where  <inline-formula><mml:math id="M59" display="inline"><mml:mrow><mml:mi>w</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> and  <inline-formula><mml:math id="M60" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e1741">A common choice for <inline-formula><mml:math id="M61" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> is the Gaussian kernel <xref ref-type="bibr" rid="bib1.bibx53" id="paren.37"/>:
          <disp-formula id="Ch1.E10" content-type="numbered"><label>10</label><mml:math id="M62" display="block"><mml:mrow><mml:mi mathvariant="normal">Φ</mml:mi><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:msqrt><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:msqrt></mml:mfrac></mml:mstyle><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:msup><mml:mi>w</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where  <inline-formula><mml:math id="M63" display="inline"><mml:mrow><mml:mi>w</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>   and <inline-formula><mml:math id="M64" display="inline"><mml:mrow><mml:mi mathvariant="normal">Φ</mml:mi><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e1836">The standard KDE from Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) – despite being widely applied and investigated – comes with several disadvantages in practical applications <xref ref-type="bibr" rid="bib1.bibx24" id="paren.38"/>. For example, severe boundary bias can occur when applied on a compact interval <xref ref-type="bibr" rid="bib1.bibx30" id="paren.39"/>. It means that a kernel function with a specified bandwidth, attributed to a single point near the boundary, may actually <italic>exceed</italic> the boundary. Furthermore, it can lack a proper response to variations in the magnitude of the true density <inline-formula><mml:math id="M65" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx6" id="paren.40"/>. The introduction of a parameter that depends on the respective data region can address the latter <xref ref-type="bibr" rid="bib1.bibx6" id="paren.41"/>. Unfortunately, no true independent local bandwidth strategy exists <xref ref-type="bibr" rid="bib1.bibx57" id="paren.42"/>, meaning that in all local approaches there is still an influence of neighboring data points on each locally chosen bandwidth.</p>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>The diffusion-based kernel density estimator</title>
      <p id="d1e1875">The diffusion-based KDE provides a different approach to Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) by solving a partial differential equation instead of the summation of kernel functions. This different calculation offers three main advantages: (1) consistency at the boundaries can be ensured by adding Neumann boundary conditions, (2) better resolution of multimodal data can be achieved by the inclusion of a suitable parameter function in the differential equation leading to adaptive smoothing intensity, and (3) a family of KDEs with different bandwidths is produced as a by-product of the numerical solution of the partial differential equation in individual time steps.</p>
      <p id="d1e1880">This KDE solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>), the partial differential equation describing the diffusion heat process, starting from an initial value based on the input data <inline-formula><mml:math id="M66" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and progresses forward in time to a final solution at a fixed time <inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>:
          <disp-formula id="Ch1.E11" content-type="numbered"><label>11</label><mml:math id="M68" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:msup><mml:mi>x</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e2016">The input data are treated as the initial value <inline-formula><mml:math id="M69" display="inline"><mml:mrow><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> at the initial time <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and generally set to infinitely high peaks at every data point <inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>. The time propagation in solving Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>) smooths the initial shape of <inline-formula><mml:math id="M72" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula>, meaning that <inline-formula><mml:math id="M73" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> contains less details of the input data <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> for increasing values in time <inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>. If we observe the solution <inline-formula><mml:math id="M76" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> of Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>) at a specific fixed final iteration time <inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, this parameter determines the smoothness of the function <inline-formula><mml:math id="M78" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> and how many details of the input data are resolved. This is an equivalent dependency as already seen for the KDE as the solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) depending on a bandwidth parameter <inline-formula><mml:math id="M79" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e2198">An advantageous connection to Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) is that the widely applied Gaussian kernel is a fundamental solution of this differential equation. Precisely, the Gaussian kernel from Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) as applied in the construction of a Gaussian KDE depends on the location <inline-formula><mml:math id="M80" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> and the smoothing parameter <inline-formula><mml:math id="M81" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and has the form
          <disp-formula id="Ch1.E12" content-type="numbered"><label>12</label><mml:math id="M82" display="block"><mml:mrow><mml:mi mathvariant="normal">Φ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:msqrt><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:msqrt></mml:mfrac></mml:mstyle><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:msqrt><mml:mi>t</mml:mi></mml:msqrt></mml:mfrac></mml:mstyle></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where  <inline-formula><mml:math id="M83" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>  and <inline-formula><mml:math id="M84" display="inline"><mml:mrow><mml:mi mathvariant="normal">Φ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e2355">This function solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>) as Green's function, where the time parameter <inline-formula><mml:math id="M85" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> equals the squared bandwidth parameter <inline-formula><mml:math id="M86" display="inline"><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx8" id="paren.43"/>. Consequently, we can use the result of the optimal bandwidth from Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>), only as the squared result as
          <disp-formula id="Ch1.E13" content-type="numbered"><label>13</label><mml:math id="M87" display="block"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:mi>K</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msubsup><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where we denote the optimal bandwidth now with <inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> as this is the final iteration time in the solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>). This idea to use the diffusion heat equation to calculate a KDE was first proposed by <xref ref-type="bibr" rid="bib1.bibx8" id="text.44"/> and its benefits were widely explored in <xref ref-type="bibr" rid="bib1.bibx5" id="text.45"/>.</p>
      <?pagebreak page6613?><p id="d1e2498">Our implementation of the diffusion KDE is based on <xref ref-type="bibr" rid="bib1.bibx8" id="text.46"/>, which we extended by some advancements proposed by <xref ref-type="bibr" rid="bib1.bibx5" id="text.47"/>: we included a parameter function <inline-formula><mml:math id="M89" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi>C</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> with <inline-formula><mml:math id="M90" display="inline"><mml:mrow><mml:mfenced open="|" close="|"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>p</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:msub><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">∞</mml:mi></mml:msub><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula> into Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>), acting inversely to a diffusion quotient. This parameter function allows to influence the intensity of the diffusion applied adaptively depending on the location <inline-formula><mml:math id="M91" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>. Its role and specific choice is discussed in detail in Sect. <xref ref-type="sec" rid="Ch1.S4"/>. Boundary conditions are set to be Neumann and the initial value being a normalized sum of the <inline-formula><mml:math id="M92" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distributions centered around the input data points. In the following, we call a function <inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:mi>u</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi>C</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>×</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> the <italic>diffusion kernel density estimator</italic> (diffKDE) if it solves the diffusion partial differential equation

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M94" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E14"><mml:mtd><mml:mtext>14</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:msup><mml:mi>x</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E15"><mml:mtd><mml:mtext>15</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mo>∂</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E16"><mml:mtd><mml:mtext>16</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>;</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>N</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e2896">The final iteration time <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> of the solution process of Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) is called the squared <italic>bandwidth</italic> of the diffKDE. In Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>), the data are incorporated as initial values via the Dirac <inline-formula><mml:math id="M96" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution, i.e., a generalized function which takes the value infinity at its argument and zero anywhere else. In general, <inline-formula><mml:math id="M97" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> is defined by <inline-formula><mml:math id="M98" display="inline"><mml:mrow><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M99" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M100" display="inline"><mml:mrow><mml:msubsup><mml:mo>∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="normal">∞</mml:mi></mml:msubsup><mml:mi>x</mml:mi><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx14" id="paren.48"/>. When regarded as a PDE, the Dirac <inline-formula><mml:math id="M101" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution puts all of the probability as the corresponding data point. The <inline-formula><mml:math id="M102" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution can be defined exactly as a limit of functions, the so-called Dirac sequence. In actual implementations, it has to be approximated (see Sect. <xref ref-type="sec" rid="Ch1.S5.SS3"/>).</p>
      <p id="d1e3027">This specific type of KDE has several advantages. First of all, it naturally provides a sequence of estimates for different smoothing parameters <xref ref-type="bibr" rid="bib1.bibx8" id="paren.49"/>. This makes the identification of one single optimal bandwidth unnecessary, which is ideal because the optimal value can be specific to a certain application and is often debated <xref ref-type="bibr" rid="bib1.bibx1 bib1.bibx57 bib1.bibx8 bib1.bibx52" id="paren.50"><named-content content-type="pre">e.g.,</named-content></xref>. Additionally, such a sequence allows a specification of the estimate's smoothness that is most appropriate for the analysis. The parameter function <inline-formula><mml:math id="M103" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> introduces adaptive smoothing properties <xref ref-type="bibr" rid="bib1.bibx5" id="paren.51"/>. Thus, choosing <inline-formula><mml:math id="M104" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> to be a function allows for a spatially dependent influence on the smoothing intensity, which solves the prior problem of having to locally adjust the bandwidth to the respective region to prevent oversmoothing of local data structure <xref ref-type="bibr" rid="bib1.bibx6 bib1.bibx57 bib1.bibx40" id="paren.52"/>. In contrast to local bandwidth adjustments, local variations in the smoothing intensity can be applied to resolve multimodal data as well as values close to the boundary.</p>
<sec id="Ch1.S3.SS1">
  <label>3.1</label><title>Bandwidth selection</title>
      <p id="d1e3066">We now focus on the selection of the optimal squared bandwidth <inline-formula><mml:math id="M105" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> according to the relationship <inline-formula><mml:math id="M106" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> between final iteration time <inline-formula><mml:math id="M107" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> of the diffKDE and bandwidth parameter <inline-formula><mml:math id="M108" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx8" id="paren.53"/>. In the following we refer to this as the <italic>bandwidth selection</italic> for simplicity.</p>
      <p id="d1e3123">We stressed in Eq. (<xref ref-type="disp-formula" rid="Ch1.E13"/>) that the optimal choice of the bandwidth parameter depends on the true density <inline-formula><mml:math id="M109" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. In our setup of the diffKDE, the analytical solution for <inline-formula><mml:math id="M110" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> of Eq. (<xref ref-type="disp-formula" rid="Ch1.E6"/>) depends not only on the true density <inline-formula><mml:math id="M111" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>, but also on the parameter function <inline-formula><mml:math id="M112" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula>. It can be calculated as
            <disp-formula id="Ch1.E17" content-type="numbered"><label>17</label><mml:math id="M113" display="block"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="bold">E</mml:mi><mml:mfenced open="(" close=")"><mml:msqrt><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msqrt></mml:mfenced></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:msubsup><mml:mfenced close="|" open="|"><mml:mfenced close="|" open="|"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced></mml:mfenced><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="normal">|</mml:mi><mml:msub><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> norm and <inline-formula><mml:math id="M116" display="inline"><mml:mrow><mml:mi mathvariant="bold">E</mml:mi><mml:mfenced open="(" close=")"><mml:mo>⋅</mml:mo></mml:mfenced></mml:mrow></mml:math></inline-formula> the expected value. The proof of this equation is given in detail in <xref ref-type="bibr" rid="bib1.bibx5" id="text.54"/>. The role of the parameter function <inline-formula><mml:math id="M117" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is described in detail in Sect. <xref ref-type="sec" rid="Ch1.S3.SS2"/>.</p>
      <p id="d1e3289">In the simplified setup with <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> as in Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>), the analytical optimal solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E13"/>) becomes
            <disp-formula id="Ch1.E18" content-type="numbered"><label>18</label><mml:math id="M119" display="block"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow><mml:mo>∗</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi>N</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:mfenced close="|" open="|"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e3378">Still, the smoothing parameter depends on the unknown density function <inline-formula><mml:math id="M120" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> and its derivatives. So we will need to find a suitable approximation of <inline-formula><mml:math id="M121" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>, which might again be dependent on <inline-formula><mml:math id="M122" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> and p. This implicit dependency can be solved by so-called pilot estimation steps. Pilot estimates are generally rough estimates of <inline-formula><mml:math id="M123" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> calculated in an initial step to use them for an approximation of Eqs. (<xref ref-type="disp-formula" rid="Ch1.E17"/>) and (<xref ref-type="disp-formula" rid="Ch1.E18"/>), which later serve to calculate a more precise estimate of <inline-formula><mml:math id="M124" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. A more detailed introduction into pilot estimation and its specific benefit for diffusion-based KDEs is presented in Sect. <xref ref-type="sec" rid="Ch1.S3.SS2"/>.</p>
      <p id="d1e3424"><xref ref-type="bibr" rid="bib1.bibx5" id="text.55"/> used an iterative scheme to solve the implicit dependency of the bandwidth parameter on the true distribution <inline-formula><mml:math id="M125" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. This additional effort is avoided in our approach by directly approximating <inline-formula><mml:math id="M126" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> with a simple data-based bandwidth approximation based on two pilot estimation steps described in detail in Sect. <xref ref-type="sec" rid="Ch1.S4"/>.</p>
      <p id="d1e3445">The possible difficulties in finding one single optimal bandwidth <xref ref-type="bibr" rid="bib1.bibx52" id="paren.56"><named-content content-type="pre">e.g.,</named-content></xref> do not arise in the calculation of the diffKDE by default. This problem is solved by creating a family of estimates from different bandwidth parameters <xref ref-type="bibr" rid="bib1.bibx6" id="paren.57"/> ranging from oversmoothed estimates to those with beginning oscillations <xref ref-type="bibr" rid="bib1.bibx53" id="paren.58"/>. For the diffKDE, the progression of the time <inline-formula><mml:math id="M127" display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula> up to a final iteration time <inline-formula><mml:math id="M128" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> is equivalent to the creation of such a family of estimates. We thus only need to find a suitable optimal final iteration time <inline-formula><mml:math id="M129" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. Then the temporal solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) provides solutions for the diffKDE for the whole sequence of the temporal discretization time steps smaller than <inline-formula><mml:math id="M130" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, which we can use as the requested family of estimates.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title>Pilot estimation</title>
      <p id="d1e3506">A crude first estimate of the true density <inline-formula><mml:math id="M131" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> can serve as a pilot estimation step for several purposes <xref ref-type="bibr" rid="bib1.bibx1 bib1.bibx53" id="paren.59"/>. The most obvious purpose in our case is to obtain an estimate of <inline-formula><mml:math id="M132" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> for the calculations of the optimal bandwidth in Eq. (<xref ref-type="disp-formula" rid="Ch1.E17"/>). The second purpose is its usage for the definition of the parameter function <inline-formula><mml:math id="M133" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>).<?pagebreak page6614?> Setting this as an estimate of the true density itself introduces locally adaptive smoothing properties <xref ref-type="bibr" rid="bib1.bibx5" id="paren.60"/>. Since <inline-formula><mml:math id="M134" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> appears in the denominator in the diffusion equation, it operates conversely to a classical diffusion coefficient. Choosing <inline-formula><mml:math id="M135" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> to be a function allows for a spatially dependent influence on the smoothing intensity as follows: at points where the function <inline-formula><mml:math id="M136" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is small, the smoothing becomes more pronounced, whereas if <inline-formula><mml:math id="M137" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is larger, the smoothing is less intense. Low smoothing resolves more variability within areas with many similar values (high density), while the intensity of smoothing is increased where data values are more dispersed. Eventually, we calculate two pilot estimates – one for <inline-formula><mml:math id="M138" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and one for <inline-formula><mml:math id="M139" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> – to support the calculation of the diffKDE. We set both pilot estimates to be the solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>) with an optimal smoothing parameter approximating Eq. (<xref ref-type="disp-formula" rid="Ch1.E18"/>). This approach combines Gaussian KDE and diffKDE interchangeably to make best use of both of their benefits <xref ref-type="bibr" rid="bib1.bibx9" id="paren.61"/>.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>The new bandwidth approximation and pilot estimation approach of the diffKDE</title>
      <p id="d1e3600">Our new approach solves the diffusion equation in three stages, where the first two provide pilot estimation steps for the diffKDE. The three chosen bandwidths increase in complexity and accuracy over this iteration. This algorithm was implemented in Python 3.</p>
      <p id="d1e3603">For the optimal final iteration time <inline-formula><mml:math id="M140" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> from Eq. (<xref ref-type="disp-formula" rid="Ch1.E17"/>), we need the parameter function <inline-formula><mml:math id="M141" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> as well as the true density <inline-formula><mml:math id="M142" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. We approximate them both by a simple KDE, each as pilot estimation steps. We use for both cases the simplified diffKDE defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>), without additional parameter functions. We denote the final iteration times for <inline-formula><mml:math id="M143" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M144" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> as <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M146" display="inline"><mml:mrow><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, respectively. We use a simple bandwidth as variants of the <italic>rule of thumb</italic> by <xref ref-type="bibr" rid="bib1.bibx55" id="text.62"/> to calculate both of them.</p>
      <p id="d1e3690">We begin to estimate <inline-formula><mml:math id="M147" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, which is the final iteration time for the KDE that serves as <inline-formula><mml:math id="M148" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula>. It shall be the smoothest of the three estimates, since <inline-formula><mml:math id="M149" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> limits the resolution fineness of the diffKDE as a lower boundary. This occurs because the diffKDE converges to this parameter function and hence never resolves less details than <inline-formula><mml:math id="M150" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> itself <xref ref-type="bibr" rid="bib1.bibx5" id="paren.63"/>.</p>
      <p id="d1e3728">As seen in Eq. (<xref ref-type="disp-formula" rid="Ch1.E18"/>), the optimal bandwidth for the approximation of <inline-formula><mml:math id="M151" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> depends on the second derivative of <inline-formula><mml:math id="M152" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. We therefore need to make some initial assumption about <inline-formula><mml:math id="M153" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>. For a first simplification, we assume that <inline-formula><mml:math id="M154" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> belongs to the normal distribution family. Then the variance can be estimated by the standard deviation of the data. This leads us to the parametric approximation of the bandwidth <inline-formula><mml:math id="M155" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx55" id="paren.64"/>, <?xmltex \hack{\newpage}?>
          <disp-formula id="Ch1.E19" content-type="numbered"><label>19</label><mml:math id="M156" display="block"><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:mfenced close="|" open="|"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup><mml:mfenced close="|" open="|"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">3</mml:mn><mml:mn mathvariant="normal">8</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt></mml:mfrac></mml:mstyle></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">4</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mi>N</mml:mi></mml:mrow></mml:mfenced><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>
        whose estimate is known to be overly smooth on multimodal distributions.</p>
      <p id="d1e3972">To calculate the final iteration time <inline-formula><mml:math id="M157" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for the approximation of <inline-formula><mml:math id="M158" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E17"/>), we choose a refined approximation of Eq. (<xref ref-type="disp-formula" rid="Ch1.E18"/>) that has been proposed by <xref ref-type="bibr" rid="bib1.bibx55" id="text.65"/> as
          <disp-formula id="Ch1.E20" content-type="numbered"><label>20</label><mml:math id="M159" display="block"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">0.9</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mrow class="unit"><mml:mi mathvariant="normal">min</mml:mi></mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>,</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mtext>iqr(data)</mml:mtext><mml:mn mathvariant="normal">1.34</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mi>N</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e4050">The iqr is the interquartile range defined as <inline-formula><mml:math id="M160" display="inline"><mml:mrow><mml:mtext>iqr(data)</mml:mtext><mml:mo>=</mml:mo><mml:mi>q</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.75</mml:mn><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi>q</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.25</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The value <inline-formula><mml:math id="M161" display="inline"><mml:mrow><mml:mi>q</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.25</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> denotes the lower quartile and describes the value in data, at which 25 % of the elements in data have a value smaller than <inline-formula><mml:math id="M162" display="inline"><mml:mrow><mml:mi>q</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.25</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M163" display="inline"><mml:mrow><mml:mi>q</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.75</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> denotes the upper quartile and describes the analogue value for 75 % <xref ref-type="bibr" rid="bib1.bibx11" id="paren.66"/>.</p>
      <p id="d1e4126">We approximate optimal final iteration time <inline-formula><mml:math id="M164" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> from Eq. (<xref ref-type="disp-formula" rid="Ch1.E17"/>) by calculating <inline-formula><mml:math id="M165" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M166" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> by Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>), based on Eqs. (<xref ref-type="disp-formula" rid="Ch1.E19"/>) and (<xref ref-type="disp-formula" rid="Ch1.E20"/>), respectively, on an equidistant spatial grid <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:mo>⊆</mml:mo><mml:mover accent="true"><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> of the spatial domain <inline-formula><mml:math id="M168" display="inline"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>⊆</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>. The nominator is approximated by the unbiased estimator and denoted as <inline-formula><mml:math id="M169" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx5" id="paren.67"/>, that is,
          <disp-formula id="Ch1.E21" content-type="numbered"><label>21</label><mml:math id="M170" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi mathvariant="bold">E</mml:mi><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:msqrt><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:msqrt></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        and the second derivative in the denominator by finite differences <xref ref-type="bibr" rid="bib1.bibx31" id="paren.68"/> and set to <inline-formula><mml:math id="M171" display="inline"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M172" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>:
          <disp-formula id="Ch1.E22" content-type="numbered"><label>22</label><mml:math id="M173" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e4471">For the boundary values we set the second derivative at the lower boundary to <inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>, that is,
          <disp-formula id="Ch1.E23" content-type="numbered"><label>23</label><mml:math id="M175" display="block"><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        and the second derivative at the upper boundary to <inline-formula><mml:math id="M176" display="inline"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>:
          <disp-formula id="Ch1.E24" content-type="numbered"><label>24</label><mml:math id="M177" display="block"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>f</mml:mi><mml:mi>p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <?pagebreak page6615?><p id="d1e4701">We set the finite differences approximation from Eqs. (<xref ref-type="disp-formula" rid="Ch1.E22"/>)–(<xref ref-type="disp-formula" rid="Ch1.E24"/>) as a discrete function with image <inline-formula><mml:math id="M178" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">q</mml:mi><mml:mo>:=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>. In this way we derived an already discrete formula for approximation of the optimal squared bandwidth <inline-formula><mml:math id="M179" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> of the diffKDE on the discretization <inline-formula><mml:math id="M180" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> of <inline-formula><mml:math id="M181" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> as
          <disp-formula id="Ch1.E25" content-type="numbered"><label>25</label><mml:math id="M182" display="block"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:mfenced close="|" open="|"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="bold-italic">q</mml:mi></mml:mrow></mml:mfenced><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e4850">The <inline-formula><mml:math id="M183" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> norm is calculated on the discretized versions of <inline-formula><mml:math id="M184" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M185" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> by array operations. The integration is performed by the <italic>trapz</italic> function of the SciPy integrate package <xref ref-type="bibr" rid="bib1.bibx16" id="paren.69"/> and the square root is part of the math package <xref ref-type="bibr" rid="bib1.bibx61" id="paren.70"/>.</p>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Discretization and implementation of the diffKDE</title>
      <p id="d1e4897">Equation <xref ref-type="disp-formula" rid="Ch1.E14"/> is solved numerically using a spatial and temporal discretization. The discretization is based on finite differences and sparse matrices in Python. A similar approach can be found in a diffusion-based kernel density estimator for linear networks implemented in R by <xref ref-type="bibr" rid="bib1.bibx31" id="text.71"/>.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>Spatial discretization</title>
      <p id="d1e4912">We start with the description of the discretization of the spatial domain <inline-formula><mml:math id="M186" display="inline"><mml:mrow><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>⊆</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>. This will reduce the partial differential equation in Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) into a system of linear ordinary differential equations. Let <inline-formula><mml:math id="M187" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M188" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:mo>⊆</mml:mo><mml:mover accent="true"><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo mathvariant="normal">¯</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>, an equidistant discretization of <inline-formula><mml:math id="M189" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> with <inline-formula><mml:math id="M190" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>&lt;</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and spatial discretization step size <inline-formula><mml:math id="M191" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>∋</mml:mo><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M192" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>. For the following calculations, we set <inline-formula><mml:math id="M193" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>. Let <inline-formula><mml:math id="M195" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> be the solution of the diffKDE and <inline-formula><mml:math id="M196" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> its parameter function, both as defined in Sect. <xref ref-type="sec" rid="Ch1.S3"/>. We assume that <inline-formula><mml:math id="M197" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M198" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> are both defined on <inline-formula><mml:math id="M199" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and we set <inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M202" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M203" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e5266">Let <inline-formula><mml:math id="M204" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>. We approximate Eq. (<xref ref-type="disp-formula" rid="Ch1.E15"/>) at <inline-formula><mml:math id="M205" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> by applying a first-order central difference quotient as
            <disp-formula id="Ch1.Ex1"><mml:math id="M206" display="block"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>;</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e5416">This implies
            <disp-formula id="Ch1.Ex2"><mml:math id="M207" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e5474">We approximate Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) at <inline-formula><mml:math id="M208" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> by applying a second-order central difference quotient:
            <disp-formula id="Ch1.E26" content-type="numbered"><label>26</label><mml:math id="M209" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mo>′</mml:mo></mml:msubsup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e5682">Analogously, we approximate Eqs. (<xref ref-type="disp-formula" rid="Ch1.E15"/>) and (<xref ref-type="disp-formula" rid="Ch1.E14"/>) at <inline-formula><mml:math id="M210" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> again by first- and second-order central difference quotients, respectively. This gives
            <disp-formula id="Ch1.E27" content-type="numbered"><label>27</label><mml:math id="M211" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mi>n</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e5915">Finally, we derive from Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) by applying a second-order central difference quotient for all <inline-formula><mml:math id="M212" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>:
            <disp-formula id="Ch1.E28" content-type="numbered"><label>28</label><mml:math id="M213" display="block"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mi>i</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e6074">Now, we identify <inline-formula><mml:math id="M214" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>:=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M215" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>:=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mo>′</mml:mo></mml:msubsup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msubsup><mml:mi>u</mml:mi><mml:mi>n</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M216" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>:=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> with their spatial discretizations. Furthermore, we define <inline-formula><mml:math id="M217" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mtext>upper</mml:mtext></mml:msub><mml:mo>:=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M218" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mtext>main</mml:mtext></mml:msub><mml:mo>:=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mtext>lower</mml:mtext></mml:msub><mml:mo>:=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> to be the upper, main, and lower diagonal of the tridiagonal matrix <inline-formula><mml:math id="M220" display="inline"><mml:mrow><mml:mi mathvariant="bold">V</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. Now, we set
            <disp-formula id="Ch1.E29" content-type="numbered"><label>29</label><mml:math id="M221" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mi mathvariant="bold">V</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi mathvariant="bold">A</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M222" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> means that <inline-formula><mml:math id="M223" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula> has real entries and <inline-formula><mml:math id="M224" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> rows and <inline-formula><mml:math id="M225" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> columns, and the division by <inline-formula><mml:math id="M226" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula> is applied column-wise.  Then, Eqs. (<xref ref-type="disp-formula" rid="Ch1.E26"/>)–(<xref ref-type="disp-formula" rid="Ch1.E28"/>) can be summarized as a linear system of ordinary differential equations:
            <disp-formula id="Ch1.E30" content-type="numbered"><label>30</label><mml:math id="M227" display="block"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mi mathvariant="bold">V</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e6597">By these calculations the solution of the partial differential equation from Eq. (<xref ref-type="disp-formula" rid="Ch1.E14"/>) can also be approximated by solving the system of ordinary differential equations:
            <disp-formula id="Ch1.E31" content-type="numbered"><label>31</label><mml:math id="M228" display="block"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi>t</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>Temporal discretization</title>
      <p id="d1e6659">The time-stepping applied to solve the ordinary differential equation from Eqs. (<xref ref-type="disp-formula" rid="Ch1.E31"/>) and (<xref ref-type="disp-formula" rid="Ch1.E16"/>) is again built on equidistant steps forward in time.  Let <inline-formula><mml:math id="M229" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> be small and set <inline-formula><mml:math id="M230" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M231" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M232" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula>. Set <inline-formula><mml:math id="M233" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>u</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M234" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M235" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">N</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and identify <inline-formula><mml:math id="M236" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> for all <inline-formula><mml:math id="M237" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">N</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> with their discretizations.</p>
      <?pagebreak page6616?><p id="d1e6886">We use an implicit Euler method to approximate Eq. (<xref ref-type="disp-formula" rid="Ch1.E31"/>) for all <inline-formula><mml:math id="M238" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">N</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, that is,
            <disp-formula id="Ch1.E32" content-type="numbered"><label>32</label><mml:math id="M239" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo mathvariant="bold">+</mml:mo><mml:mn mathvariant="bold">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="bold">A</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo mathvariant="bold">+</mml:mo><mml:mn mathvariant="bold">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">k</mml:mi></mml:msub></mml:mrow></mml:math></disp-formula>
          from which we obtain
            <disp-formula id="Ch1.E33" content-type="numbered"><label>33</label><mml:math id="M240" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mtext mathvariant="bold">I</mml:mtext><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="bold">A</mml:mi></mml:mrow></mml:mfenced><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo mathvariant="bold">+</mml:mo><mml:mn mathvariant="bold">1</mml:mn></mml:mrow></mml:msub><mml:mtext> for all </mml:mtext><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">N</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e6998">The implicit Euler method is chosen at this place, since it is A-stable and by this ensures convergence of the solver.</p>
      <p id="d1e7001">Equation (<xref ref-type="disp-formula" rid="Ch1.E33"/>) together with the initial value Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>) describes an implementation-ready time stepping procedure. The linear equation for <inline-formula><mml:math id="M241" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo mathvariant="bold">+</mml:mo><mml:mn mathvariant="bold">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> will be solved in every time step <inline-formula><mml:math id="M242" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">N</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1" specific-use="star"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Figure}?><label>Figure 1</label><caption><p id="d1e7042">Dirac sequence <inline-formula><mml:math id="M243" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:msub><mml:mo>)</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> for the approximation of the <inline-formula><mml:math id="M244" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution in the initial value in Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>). The function <inline-formula><mml:math id="M245" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> depends on the spatial discretization fineness <inline-formula><mml:math id="M246" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> and converges to <inline-formula><mml:math id="M247" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> for <inline-formula><mml:math id="M248" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>. The function <inline-formula><mml:math id="M249" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is piecewise linear with a peak at each data point <inline-formula><mml:math id="M250" display="inline"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> integrating to <inline-formula><mml:math id="M251" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula>.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f01.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Initial value</title>
      <p id="d1e7184">The initial value in Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>) depends on the <inline-formula><mml:math id="M252" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution <xref ref-type="bibr" rid="bib1.bibx14" id="paren.72"/>. The <inline-formula><mml:math id="M253" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution is not a proper function but can be calculated as a limit of a suitable function sequence. A common approximation for the <inline-formula><mml:math id="M254" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution is to use a Dirac sequence <xref ref-type="bibr" rid="bib1.bibx21" id="paren.73"/>. Such is a sequence <inline-formula><mml:math id="M255" display="inline"><mml:mrow><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mrow><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> of integrable functions that are non-negative and satisfy
            <disp-formula id="Ch1.E34" content-type="numbered"><label>34</label><mml:math id="M256" display="block"><mml:mrow><mml:mo movablelimits="false">∫</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mtext> for all </mml:mtext><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></disp-formula>
          and
            <disp-formula id="Ch1.E35" content-type="numbered"><label>35</label><mml:math id="M257" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">lim⁡</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:munder><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:msub><mml:mi mathvariant="script">B</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mtext> for all </mml:mtext><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M258" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">B</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>;</mml:mo><mml:mi mathvariant="normal">|</mml:mi><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mi mathvariant="normal">|</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo>=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> is the open subset of R centered around <inline-formula><mml:math id="M259" display="inline"><mml:mi mathvariant="double-struck">R</mml:mi></mml:math></inline-formula> with radius <inline-formula><mml:math id="M260" display="inline"><mml:mi mathvariant="italic">ρ</mml:mi></mml:math></inline-formula>. For our implementation we define a Dirac sequence <inline-formula><mml:math id="M261" display="inline"><mml:mrow><mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> depending on the spatial discretization step size <inline-formula><mml:math id="M262" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> as an approximation of <inline-formula><mml:math id="M263" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>). The spatial discretization step size <inline-formula><mml:math id="M264" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> equals the length of the domain <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:mfenced open="|" close="|"><mml:mi mathvariant="normal">Ω</mml:mi></mml:mfenced></mml:mrow></mml:math></inline-formula> divided by the number of spatial discretization points <inline-formula><mml:math id="M266" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>, namely <inline-formula><mml:math id="M267" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mfenced close="|" open="|"><mml:mi mathvariant="normal">Ω</mml:mi></mml:mfenced></mml:mrow><mml:mi>n</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula>. This relationship provides the dependency of <inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> on <inline-formula><mml:math id="M269" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula> and the equivalence of the limits <inline-formula><mml:math id="M270" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M271" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> in this framework. In the following we give the specific definition of our function sequence of choice and proof that this indeed defines a proper Dirac sequence.</p>
      <p id="d1e7567">We assume <inline-formula><mml:math id="M272" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:mrow></mml:math></inline-formula>. Then there exists an <inline-formula><mml:math id="M273" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> with <inline-formula><mml:math id="M274" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>∈</mml:mo><mml:mfenced close=")" open="["><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>. If not readily defined, we set <inline-formula><mml:math id="M275" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M276" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>, and we define the following (see also Fig. <xref ref-type="fig" rid="Ch1.F1"/>):
            <disp-formula id="Ch1.E36" content-type="numbered"><label>36</label><mml:math id="M277" display="block"><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{8.8}{8.8}\selectfont$\displaystyle}?><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mfenced open="{" close=""><mml:mtable columnspacing="1em" rowspacing="0.2ex" class="cases" columnalign="left left" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mfenced close="|" open="|"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mfenced open="[" close=")"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mfenced open="[" close=")"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mfenced close="|" open="|"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mtext>else</mml:mtext><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced></mml:mrow><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M278" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e8049">Then <inline-formula><mml:math id="M279" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is non-negative for all <inline-formula><mml:math id="M280" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and as a composition of integrable functions integrable with <inline-formula><mml:math id="M281" display="inline"><mml:mrow><mml:mo>∫</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> (see Appendix <xref ref-type="sec" rid="App1.Ch1.S2"/>) and <inline-formula><mml:math id="M282" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msup><mml:mfenced close=")" open="("><mml:mi mathvariant="double-struck">R</mml:mi></mml:mfenced><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>f</mml:mi><mml:mo>:</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>;</mml:mo><mml:mi>f</mml:mi><mml:mtext> integrable and </mml:mtext><mml:mo>∫</mml:mo><mml:mi mathvariant="normal">|</mml:mi><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><?xmltex \currentcnt{1}?><label>Table 1</label><caption><p id="d1e8181">Input variables. The only required input variable for the calculation of the diffKDE is a one-dimensional data set as an array-like type. All other variables are optional, with some prescribed defaults. On demand the user can set individual lower and upper bounds for their data evaluation under the diffKDE as well as the number of used spatial and temporal discretization intervals. The individual selection of the final iteration time provides the opportunity to choose the specific smoothing grade on demand.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="5">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:colspec colnum="5" colname="col5" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Index</oasis:entry>
         <oasis:entry colname="col2">Name</oasis:entry>
         <oasis:entry colname="col3">Type</oasis:entry>
         <oasis:entry colname="col4">Default</oasis:entry>
         <oasis:entry colname="col5">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">0</oasis:entry>
         <oasis:entry colname="col2">data</oasis:entry>
         <oasis:entry colname="col3">Array-like</oasis:entry>
         <oasis:entry colname="col4">Required</oasis:entry>
         <oasis:entry colname="col5">Input data <inline-formula><mml:math id="M283" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>N</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">1</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M284" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula>min</oasis:entry>
         <oasis:entry colname="col3">Float</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M285" display="inline"><mml:mrow><mml:mo>min⁡</mml:mo><mml:mi mathvariant="bold-italic">X</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Lower data boundary for KDE calculation</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">2</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M286" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula>max</oasis:entry>
         <oasis:entry colname="col3">Float</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M287" display="inline"><mml:mrow><mml:mo>max⁡</mml:mo><mml:mi mathvariant="bold-italic">X</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Upper data boundary for KDE calculation</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">3</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M288" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">Integer</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M289" display="inline"><mml:mn mathvariant="normal">1004</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Number of spatial discretization intervals in <inline-formula><mml:math id="M290" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">time steps</oasis:entry>
         <oasis:entry colname="col3">Integer</oasis:entry>
         <oasis:entry colname="col4">20</oasis:entry>
         <oasis:entry colname="col5">Number of temporal discretization intervals</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">5</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M291" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">Float</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Final iteration time for diffKDE</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{1}?></table-wrap>

      <p id="d1e8405">Now, let <inline-formula><mml:math id="M293" display="inline"><mml:mrow><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and set <inline-formula><mml:math id="M294" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>. Then we have by Eq. (<xref ref-type="disp-formula" rid="Ch1.E36"/>)
            <disp-formula id="Ch1.Ex3"><mml:math id="M295" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:msub><mml:mi mathvariant="script">B</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="italic">ρ</mml:mi></mml:munderover><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi mathvariant="normal">∞</mml:mi></mml:munderover><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="italic">ρ</mml:mi></mml:munderover><mml:mn mathvariant="normal">0</mml:mn><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi mathvariant="normal">∞</mml:mi></mml:munderover><mml:mn mathvariant="normal">0</mml:mn><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          and it follows that
            <disp-formula id="Ch1.E37" content-type="numbered"><label>37</label><mml:math id="M296" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">lim⁡</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:msub><mml:mi mathvariant="script">B</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mtext> for all </mml:mtext><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e8632">Hence Eq. (<xref ref-type="disp-formula" rid="Ch1.E36"/>) defines a Dirac sequence. We use <inline-formula><mml:math id="M297" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for the approximation of the <inline-formula><mml:math id="M298" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution in our implementation of Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>).</p>
      <p id="d1e8657">The concept of the Dirac sequence also provides the justification to generally rely on the <inline-formula><mml:math id="M299" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution in the construction of the initial value of the diffKDE. The Gaussian kernel defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) that solves the diffusion equation as a fundamental solution is again a Dirac sequence <xref ref-type="bibr" rid="bib1.bibx4" id="paren.74"/>. This link connects the diffKDE directly back to the <inline-formula><mml:math id="M300" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution.</p>
</sec>
<sec id="Ch1.S5.SS4">
  <label>5.4</label><title>The diffKDE algorithm realization in Python</title>
      <p id="d1e8688">The implementation was conducted in Python and its concept is shown in Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>. We used the Python libraries Numpy <xref ref-type="bibr" rid="bib1.bibx18" id="paren.75"/> and SciPy <xref ref-type="bibr" rid="bib1.bibx65 bib1.bibx16" id="paren.76"/> and the Python Math module <xref ref-type="bibr" rid="bib1.bibx61" id="paren.77"/> for data preprocessing, calculation of the bandwidths, as well as setup of the differential equations and their solution. The algorithm iteratively calculates three KDEs: first, the two for the approximations of <inline-formula><mml:math id="M301" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M302" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> as the pilot estimation steps described in Sect. <xref ref-type="sec" rid="Ch1.S4"/>, and the last one being <inline-formula><mml:math id="M303" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula>, the solution of the diffKDE built on the prior two. All three KDEs are calculated by solving the diffusion equation up to the respective final iteration time. The solution is realized in <italic>while</italic> loops solving Eq. (<xref ref-type="disp-formula" rid="Ch1.E33"/>). The two pilot estimation steps can be calculated simultaneously, since they are independent of each other and only differ in their final iteration times <inline-formula><mml:math id="M304" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M305" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. All input variables are displayed in Table <xref ref-type="table" rid="Ch1.T1"/> and the return values are listed in Table <xref ref-type="table" rid="Ch1.T2"/>.</p><?xmltex \floatpos{htbp}?><boxed-text content-type="algorithm" position="float" id="Ch1.Prog1"><?xmltex \currentcnt{1}?><label>Algorithm 1</label><caption><p id="d1e8759">Finite-differences-based algorithm for the implementation of the diffusion KDE.<?xmltex \hack{\\}?>Note: the routine solve<inline-formula><mml:math id="M306" display="inline"><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext><mml:mo>,</mml:mo><mml:mi mathvariant="bold">b</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> means that the system <inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:mtext mathvariant="bold">M</mml:mtext><mml:mi mathvariant="bold">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold">b</mml:mi></mml:mrow></mml:math></inline-formula> is solved.</p></caption><disp-quote content-type="algorithmic" specific-use="numbering{1}"><list>

    <list-item><label><bold>Require:</bold></label>

      <p id="d1e8799" specific-use="REQUIRE"><inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>N</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M309" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M310" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>p</mml:mi><mml:mi>s</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M312" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e8888" specific-use="STATE"><inline-formula><mml:math id="M313" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>←</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e8931" specific-use="STATE"><inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:mi mathvariant="bold">Ω</mml:mi><mml:mo>←</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfenced><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9010" specific-use="STATE"><inline-formula><mml:math id="M315" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">f</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>←</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9037" specific-use="STATE"><inline-formula><mml:math id="M316" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">4</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mi>N</mml:mi></mml:mrow></mml:mfenced><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9079" specific-use="STATE"><inline-formula><mml:math id="M317" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">0.9</mml:mn><mml:mtext>min</mml:mtext><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>,</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mi>i</mml:mi><mml:mi>q</mml:mi><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi>d</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mn mathvariant="normal">1.34</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mi>N</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9145" specific-use="STATE"><inline-formula><mml:math id="M318" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>p</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M320" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>f</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>p</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9239" specific-use="WHILE"><bold>while</bold> <inline-formula><mml:math id="M321" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>&lt;</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> <bold>do</bold> <list>
    <list-item>
      <p id="d1e9265" specific-use="STATE"><inline-formula><mml:math id="M322" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>←</mml:mo><mml:mtext>solve</mml:mtext><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mtext mathvariant="bold">I</mml:mtext><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula></p></list-item>
    <list-item>
      <p id="d1e9308" specific-use="STATE"><inline-formula><mml:math id="M323" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">f</mml:mi><mml:mo>←</mml:mo><mml:mtext>solve</mml:mtext><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mtext mathvariant="bold">I</mml:mtext><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>f</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">f</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula></p></list-item>
    <list-item>
      <p id="d1e9351" specific-use="STATE"><inline-formula><mml:math id="M324" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></p></list-item></list></p>
            </list-item>

    <list-item>

      <p id="d1e9374" specific-use="ENDWHILE"><bold>end</bold> <bold>while</bold></p>
            </list-item>

    <list-item>

      <p id="d1e9384" specific-use="STATE"><inline-formula><mml:math id="M325" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">q</mml:mi><mml:mo>←</mml:mo><mml:msqrt><mml:mrow><mml:msub><mml:mo>∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="bold-italic">f</mml:mi><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>d</mml:mi><mml:mi>h</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9427" specific-use="STATE"><inline-formula><mml:math id="M326" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:msub><mml:mo>←</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:msqrt><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:msqrt></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9486" specific-use="STATE"><inline-formula><mml:math id="M327" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>←</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>N</mml:mi><mml:msqrt><mml:mi mathvariant="italic">π</mml:mi></mml:msqrt><mml:msup><mml:mi>q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:msup></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9528" specific-use="STATE"><inline-formula><mml:math id="M328" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M329" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mo>←</mml:mo><mml:mi>T</mml:mi><mml:mo>/</mml:mo><mml:mi>t</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>e</mml:mi><mml:mi>s</mml:mi><mml:mi>t</mml:mi><mml:mi>e</mml:mi><mml:mi>p</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:math></inline-formula></p>
            </list-item>

    <list-item>

      <p id="d1e9577" specific-use="WHILE"><bold>while</bold> <inline-formula><mml:math id="M330" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>&lt;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula> <bold>do</bold> <list>
    <list-item>
      <p id="d1e9600" specific-use="STATE"><inline-formula><mml:math id="M331" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>←</mml:mo><mml:mtext>solve</mml:mtext><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mtext mathvariant="bold">I</mml:mtext><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="bold">A</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula></p></list-item>
    <list-item>
      <p id="d1e9637" specific-use="STATE"><inline-formula><mml:math id="M332" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>←</mml:mo><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi></mml:mrow></mml:math></inline-formula></p></list-item></list></p>
            </list-item>

    <list-item>

      <p id="d1e9657" specific-use="ENDWHILE"><bold>end</bold> <bold>while</bold></p>
            </list-item>

    <list-item>

      <p id="d1e9667" specific-use="RETURN"><bold>return</bold>  <inline-formula><mml:math id="M333" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold">Ω</mml:mi></mml:mrow></mml:math></inline-formula></p>
            </list-item>
          </list></disp-quote></boxed-text>
      <?pagebreak page6617?><p id="d1e9685">The spatial grid discretizing <inline-formula><mml:math id="M334" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> is set up according to the description in Sect. <xref ref-type="sec" rid="Ch1.S5.SS1"/> in lines 1 and 2 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>. It consists of <inline-formula><mml:math id="M335" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula> intervals, where <inline-formula><mml:math id="M336" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> can be set by the user. The boundary values are <inline-formula><mml:math id="M337" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mo>min⁡</mml:mo><mml:mi>X</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M338" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mo>max⁡</mml:mo><mml:mi>X</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula> by default but can also be chosen individually. Setting the boundary values to an individually chosen interval in the function call results in a clipping of the used data to this smaller one before KDE calculation. Outside the interval boundaries, the diffKDE adds two additional discretization points to make it applicable for the case of a data point <inline-formula><mml:math id="M339" display="inline"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M340" display="inline"><mml:mrow><mml:mi>j</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> being directly located at one of the boundaries. This way it is possible to construct the initial value defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E36"/>), which takes into account the two neighboring discretization points in each direction. This leads to a full set of <inline-formula><mml:math id="M341" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> equidistant discretization points <inline-formula><mml:math id="M342" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> saved in a vector variable denoted in Algorithm <xref ref-type="other" rid="Ch1.Prog1"/> as <inline-formula><mml:math id="M343" display="inline"><mml:mi mathvariant="bold">Ω</mml:mi></mml:math></inline-formula>. The spatial discretization <inline-formula><mml:math id="M344" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mo>)</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> includes an inner discretization between the handed in (or default set) interval endpoints <inline-formula><mml:math id="M345" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>min</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M346" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mtext>max</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> of <inline-formula><mml:math id="M347" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula> equally sized inner discretization intervals.</p>
      <p id="d1e9905">The Dirac sequence <inline-formula><mml:math id="M348" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for the implementation of the initial value is defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E36"/>) and we use the same for initialization of all three approximations of the PDF (<inline-formula><mml:math id="M349" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">f</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>) in line 3 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>. In its calculation, the algorithm searches for each <inline-formula><mml:math id="M350" display="inline"><mml:mrow><mml:mi>j</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> for the <inline-formula><mml:math id="M351" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> with <inline-formula><mml:math id="M352" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> being the closest right neighbor of <inline-formula><mml:math id="M353" display="inline"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Then the initial value is constructed by assigning the values <inline-formula><mml:math id="M354" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M355" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>X</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula> at grid point <inline-formula><mml:math id="M356" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M357" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, respectively, and zero elsewhere. These values correspond to the weighted heights <inline-formula><mml:math id="M358" display="inline"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M359" display="inline"><mml:mrow><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> displayed in Fig. <xref ref-type="fig" rid="Ch1.F1"/>. The final initial value is the normalized sum of all these individual approximations of the <inline-formula><mml:math id="M360" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution. All three used KDEs (<inline-formula><mml:math id="M361" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">f</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>) are initialized with this initial value.</p>
      <?pagebreak page6618?><p id="d1e10190">In the pilot estimation steps, we calculate the KDEs for <inline-formula><mml:math id="M362" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula> and for <inline-formula><mml:math id="M363" display="inline"><mml:mi mathvariant="bold-italic">f</mml:mi></mml:math></inline-formula> required for the setup of the final iteration time <inline-formula><mml:math id="M364" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> for the diffKDE. The final iteration times <inline-formula><mml:math id="M365" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M366" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for <inline-formula><mml:math id="M367" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M368" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>, respectively, are calculated based on the input data <inline-formula><mml:math id="M369" display="inline"><mml:mi>X</mml:mi></mml:math></inline-formula> in lines 4 and 5 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/> as described in Sect. <xref ref-type="sec" rid="Ch1.S4"/>. Then the KDEs are calculated by solving a linear ordinary differential equation by an implicit Euler approach in the first <italic>while</italic> loop in lines 7–9 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>. For the pilot estimation steps calculating <inline-formula><mml:math id="M370" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M371" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> the matrix <inline-formula><mml:math id="M372" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula> defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E29"/>) does not incorporate a parameter function and reduces to a matrix denoted as <inline-formula><mml:math id="M373" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, that is
            <disp-formula id="Ch1.E38" content-type="numbered"><label>38</label><mml:math id="M374" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mi mathvariant="bold">V</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M375" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> means that <inline-formula><mml:math id="M376" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> has real entries and <inline-formula><mml:math id="M377" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> rows and <inline-formula><mml:math id="M378" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> columns. Apart from this, the solutions for the pilot KDEs are the same as for the final diffKDE. The two pilot KDEs can be solved simultaneously, since they share their matrix <inline-formula><mml:math id="M379" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="normal">pilot</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and have independent pre-computed final iteration times. The difference in their bandwidths is implemented in different time step sizes <inline-formula><mml:math id="M380" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M381" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for <inline-formula><mml:math id="M382" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M383" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>, respectively, which are initialized in line 6 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/> directly before this first <italic>while</italic> loop. The temporal solutions are calculated <inline-formula><mml:math id="M384" display="inline"><mml:mrow><mml:mtext>time steps</mml:mtext><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">N</mml:mi></mml:mrow></mml:math></inline-formula> times in equidistantly increasing time steps until each individual final iteration time. Since we solve implicitly, there is no restriction to the time step size. But a larger time steps parameter reduces the numerical error proportional to the step size parameters <inline-formula><mml:math id="M385" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M386" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. In this temporal solution we rely on the fact that the involved matrices are sparsely covered. The applied solver is part of the SciPy Python library and designed for efficient solution of linear systems including sparse matrices <xref ref-type="bibr" rid="bib1.bibx65 bib1.bibx16" id="paren.78"/>.</p>
      <p id="d1e10533">The final iteration time <inline-formula><mml:math id="M387" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> for the diffKDE solution <inline-formula><mml:math id="M388" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula> is calculated after the calculations of <inline-formula><mml:math id="M389" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M390" display="inline"><mml:mi mathvariant="bold-italic">f</mml:mi></mml:math></inline-formula>, using them both as described in Sect. <xref ref-type="sec" rid="Ch1.S4"/> in lines 12–14 of Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>.  For the diffKDE <inline-formula><mml:math id="M391" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula>, the differential equation is given in Eq. (<xref ref-type="disp-formula" rid="Ch1.E31"/>) and the solution uses the implicit Euler approach in Eq. (<xref ref-type="disp-formula" rid="Ch1.E33"/>). This is implemented in a second <italic>while</italic> loop described in lines 16–18 in Algorithm <xref ref-type="other" rid="Ch1.Prog1"/>, which is separated from the final iteration time <inline-formula><mml:math id="M392" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> and the matrix <inline-formula><mml:math id="M393" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula> identical to the calculations in the pilot step.</p>
      <p id="d1e10604">The return value is a tuple providing the user the diffKDE and the spatial discretization as displayed in Table <xref ref-type="table" rid="Ch1.T2"/>.</p>
      <p id="d1e10609">Possible problems are caught in <italic>assert</italic> and <italic>if</italic> clauses. Initially, the data are reshaped to a Numpy array for the case of a list handed in, and it is made sure that this is non-empty. For the case of numerical issues leading to a pilot estimate including zero values, the whole pilot is set back equal to <inline-formula><mml:math id="M394" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> to ensure numerical convergence. Accordingly for the case of NaN value being delivered for the optimal bandwidth for the diffKDE, in which case this is also set to the bandwidth chosen for <inline-formula><mml:math id="M395" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E20"/>).</p>
</sec>
<sec id="Ch1.S5.SS5">
  <label>5.5</label><title>Pre-implemented functions for visual outputs</title>
      <p id="d1e10642">Besides the standard use to calculate a diffKDE at an approximated optimal final iteration time for direct usage, we also included three possibilities to generate a direct visual output, one of them being interactive. Matplotlib <xref ref-type="bibr" rid="bib1.bibx22" id="paren.79"/> provides the software measures for creating the plots. Most methods are part of the submodule Pyplot, whereas the interactive plot is based on the submodule Slider.</p>
      <p id="d1e10648">The function call <italic>evol_plot</italic> opens a plot showing the time evolution of the diffKDE (e.g., see Fig. <xref ref-type="fig" rid="Ch1.F2"/> for an example output). The plot includes drawings of the data points on the <inline-formula><mml:math id="M396" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. In the background the initial values are drawn. The <inline-formula><mml:math id="M397" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis range is cut off at 20 % above the global maximum of the diffKDE to preserve focus of the graphic on the diffKDE and evolution. The evolution is presented by drawings of the individual time evolution stages using the sequential color map Viridis. The diffKDE is drawn in a bold blue line. This visualization of the evolution provides the user with insight into the data distribution and their respective influence on the final form of the diffKDE.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Figure}?><label>Figure 2</label><caption><p id="d1e10672">Pre-implemented direct visual output of the evolution process of the diffKDE. The input data are <inline-formula><mml:math id="M398" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> samples randomly collected from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>). The individual data points are drawn on the <inline-formula><mml:math id="M399" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. The <inline-formula><mml:math id="M400" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis represents the estimated probability density. The light yellow vertical lines in the background are the initial value of the diffKDE. The temporal evolution of the solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E33"/>) is visualized by the sequent color scheme from light yellow over green to the bold blue graph in the front. This bold blue graph equals the diffKDE at the approximated optimal final iteration time.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f02.png"/>

        </fig>

      <p id="d1e10707">The function call <italic>pilot_plot</italic> opens which shows the diffKDE together with its pilot estimate <inline-formula><mml:math id="M401" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula>, showing the intensity of local smoothing (e.g., see Fig. <xref ref-type="fig" rid="Ch1.F3"/> for an example output). With this the user has the possibility to gain insight to the influence of this pilot estimator on the performance of the diffKDE. This plot also includes the data points on the <inline-formula><mml:math id="M402" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Figure}?><label>Figure 3</label><caption><p id="d1e10731">The diffKDE and its pilot estimate <inline-formula><mml:math id="M403" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula>. The input data are <inline-formula><mml:math id="M404" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> samples randomly collected from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>). The data points are drawn on the <inline-formula><mml:math id="M405" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. The <inline-formula><mml:math id="M406" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> axis represents the estimated density of the diffKDE in blue and the pilot estimate in red.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f03.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Figure}?><label>Figure 4</label><caption><p id="d1e10772">Different snapshots from the interactive visualization of the diffusion KDE generated from the artificial data set <inline-formula><mml:math id="M407" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.3</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.33</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.34</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.35</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.36</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.37</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.55</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.7</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">0.8</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. Panel <bold>(a)</bold> shows the output at <inline-formula><mml:math id="M408" display="inline"><mml:mrow><mml:mrow class="chem"><mml:mi mathvariant="normal">time</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and hence the initial value. Panel <bold>(b)</bold> shows an intermediate smoothing stage of the diffKDE. Panel <bold>(c)</bold> shows the diffKDE of the input data at the approximated optimal iteration time <inline-formula><mml:math id="M409" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. This is the initial stage of the interactive graphic. By clicking the button on the lower right, the graphic can be reset to this stage. Panel <bold>(d)</bold> shows an oversmoothed version of the diffKDE at the doubled approximated optimal iteration time.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f04.png"/>

        </fig>

      <p id="d1e10876">The function call <italic>custom_plot</italic> opens an interactive plot, allowing the user to slide through different approximation stages of the diffKDE (e.g., see Fig. <xref ref-type="fig" rid="Ch1.F4"/> for an example output). This feature is based on the Slider module from the Matplotlib library <xref ref-type="bibr" rid="bib1.bibx22" id="paren.80"/> and opens a plot showing the<?pagebreak page6619?> diffKDE. At the bottom of this plot is a scale that shows the time, initially being set to the optimal iteration time derived from Eq. (<xref ref-type="disp-formula" rid="Ch1.E17"/>) in the middle of the scale. By clicking on the scale, the user can display the evolution stages at the respective (closest) iteration time. This reaches down to the initial value and up to the doubled optimal iteration time. This interactive tool provides the user a simple tool to follow the estimate at different bandwidths. With the help of such a plot it is possible to decide on whether the diffKDE is desired to be applied with a final iteration time that is different from the default.</p><?xmltex \hack{\newpage}?>
</sec>
</sec>
<?pagebreak page6620?><sec id="Ch1.S6">
  <label>6</label><title>Results on artificial data</title>
      <p id="d1e10899">In the following we document the performance of the diffKDE on artificial and real marine biogeochemical data. Whenever not stated otherwise, we used the default values of the input variables given in Table <xref ref-type="table" rid="Ch1.T1"/> in the calculation of the diffKDE.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2"><?xmltex \currentcnt{2}?><label>Table 2</label><caption><p id="d1e10907">Return values of the diffKDE. The return variable of the diffKDE is a vector. Its first entry is the diffKDE evaluated on the spatial grid. Its second entry is the spatial grid <inline-formula><mml:math id="M410" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula>.</p></caption><oasis:table frame="topbot"><?xmltex \begin{scaleboxenv}{.97}[.97]?><oasis:tgroup cols="5">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:colspec colnum="5" colname="col5" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Index</oasis:entry>
         <oasis:entry colname="col2">Name</oasis:entry>
         <oasis:entry colname="col3">Type</oasis:entry>
         <oasis:entry colname="col4">Size</oasis:entry>
         <oasis:entry colname="col5">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">0</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M411" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">Numpy array</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M412" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">diffKDE values on <inline-formula><mml:math id="M413" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">1</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M414" display="inline"><mml:mi mathvariant="bold">Ω</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">Numpy array</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M415" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Spatial discretization</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup><?xmltex \end{scaleboxenv}?></oasis:table><?xmltex \gdef\@currentlabel{2}?></table-wrap>

      <?pagebreak page6621?><p id="d1e11029">For testing our implementation against a known true PDF, we first constructed a three-modal distribution.  The objective was to assess the diffKDE's resolution and to exemplify the pre-implemented plot routines. The distribution was constructed from three Gaussian kernels centered around <inline-formula><mml:math id="M416" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M417" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">6.5</mml:mn></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M418" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">9</mml:mn></mml:mrow></mml:math></inline-formula> and with variances <inline-formula><mml:math id="M419" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M420" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mn mathvariant="normal">0.7</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M421" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">3</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mn mathvariant="normal">0.5</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, each of them with a relative contribution of 30 %, 60 %, and 10 %, respectively:
          <disp-formula id="Ch1.E39" content-type="numbered"><label>39</label><mml:math id="M422" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mn mathvariant="normal">0.3</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:msqrt><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:msqrt></mml:mfrac></mml:mstyle><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mn mathvariant="normal">0.6</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">0.7</mml:mn><mml:msqrt><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced close=")" open="("><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">6.5</mml:mn></mml:mrow><mml:mn mathvariant="normal">0.7</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:mn mathvariant="normal">0.1</mml:mn><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:mn mathvariant="normal">0.5</mml:mn><mml:msqrt><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:msqrt></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced close=")" open="("><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">9</mml:mn></mml:mrow><mml:mn mathvariant="normal">0.5</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<sec id="Ch1.S6.SS1">
  <label>6.1</label><title>Pre-implemented outputs</title>
      <p id="d1e11295">As described in Sect. <xref ref-type="sec" rid="Ch1.S5.SS5"/>, we included three plot functions in the diffKDE implementation. All of them open pre-implemented plots to give an impression of the special features that come with the diffKDE. An overview of the three possible direct visual outputs of the diffKDE software is described below.</p>
      <p id="d1e11300">First we demonstrate how to display the diffKDE's evolution. By calling the <italic>evol_plot</italic> function, a plot opens that shows all temporal evolution stages of the solution of Eq. (<xref ref-type="disp-formula" rid="Ch1.E33"/>). The temporal progress is visualized by a sequential color scheme progressing from light yellow over different shades of green to dark blue. On the <inline-formula><mml:math id="M423" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis, all used data points are drawn. In the background, a cut-off part of the initial value as the beginning of the temporal evolution is depicted in light yellow. The final diffKDE is plotted as a bold blue line in front of the evolution process. This gives the user insight into the distribution of the initial data and their influence on the shape of the estimate. As an example of the default setting, we created an evolution plot from <inline-formula><mml:math id="M424" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> random samples of Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) visualized in Fig. <xref ref-type="fig" rid="Ch1.F2"/>. The second example shows the possibility of displaying the diffKDE together with the pilot estimate <inline-formula><mml:math id="M425" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> by the function <italic>pilot_plot</italic>. This is the parameter function in Eq. (<xref ref-type="disp-formula" rid="Ch1.E16"/>) responsible for the adaptive smoothing. Where this function is larger, the smoothing is less intense and allows more structure in the estimate of the diffKDE. Contrarily, where it is smaller the smoothing becomes more pronounced and data gaps are better smoothed out. The result of the diffKDE is shown together with its parameter function <inline-formula><mml:math id="M426" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> in figure Fig. <xref ref-type="fig" rid="Ch1.F3"/> on the same random sample of the distribution from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) as before.</p>
      <p id="d1e11351">Lastly, we illustrate example snapshots of the interactive option to investigate different smoothing stages of the diffKDE by the function. We chose simpler and smaller example data for this demonstration, because these are better suited for visualization of this tool's possibilities. The function <italic>custom_plot</italic> opens an interactive graphic, starting with a plot of the approximated optimal default solution of the diffKDE at <inline-formula><mml:math id="M427" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. In this graphic the user is able to individually choose, by a slider, the iteration time at which the desired approximation stage of the diffKDE can be seen. The time can be chosen from <inline-formula><mml:math id="M428" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula>, where the initial value is shown, up until the doubled approximated optimal time (<inline-formula><mml:math id="M429" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>). A reset button sets the graphic back to its initial stage of the diffKDE at <inline-formula><mml:math id="M430" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. Four snapshots of this interactive experience are shown in Fig. <xref ref-type="fig" rid="Ch1.F4"/>.</p>
</sec>
<sec id="Ch1.S6.SS2">
  <label>6.2</label><title>Performance analyses on known distributions and in comparison to other KDEs</title>
      <p id="d1e11412">In this section we present results obtained by random samples of the trimodal distribution from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) and lognormal distributions with differing parameters. Wherever suitable, the results are compared with other commonly used KDEs. These include the most common Gaussian KDE with the kernel function from Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) in an implementation from SciPy <xref ref-type="bibr" rid="bib1.bibx16" id="paren.81"/>, the Epanechnikov KDE with the kernel function from Eq. (<xref ref-type="disp-formula" rid="Ch1.E9"/>) in an implementation from Scikit-learn <xref ref-type="bibr" rid="bib1.bibx39" id="paren.82"/>, and an improved implementation of the Gaussian KDE by <xref ref-type="bibr" rid="bib1.bibx5" id="text.83"/> in a Python implementation by <xref ref-type="bibr" rid="bib1.bibx20" id="text.84"/>. We begin with an example of how the user may choose individually different smoothing grades of the diffKDE, then compare the different KDEs with the true distribution, followed by investigating the influence of noise on different KDEs, and finally show the convergence of different KDEs to the true distribution with increasing sample size.</p>
      <p id="d1e11434">We start with an individual selection of the approximation stages. This is one of the main benefits of the diffKDE compared with standard KDEs by providing naturally a family of approximations. This family can be observed by the function <italic>custom_plot</italic>. Individual members can be produced by setting the bandwidth parameter <inline-formula><mml:math id="M431" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> in the function call of the diffKDE. This gives the user the chance to choose among more and less smooth approximations. A selection of such approximations along with the default solution are shown in Fig. <xref ref-type="fig" rid="Ch1.F5"/> on a random sample of <inline-formula><mml:math id="M432" display="inline"><mml:mn mathvariant="normal">50</mml:mn></mml:math></inline-formula> data points from the trimodal distribution in Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>). The plot shows how smaller iteration times resolve more structure in the estimate, while a substantially larger iteration time has only little influence on the increased smoothing of the diffKDE.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><?xmltex \currentcnt{5}?><?xmltex \def\figurename{Figure}?><label>Figure 5</label><caption><p id="d1e11460">Family of diffKDEs evaluated at different bandwidths. A data set of 50 random samples drawn as gray circles on the <inline-formula><mml:math id="M433" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis serve to show the possibility to investigate a whole family of estimates by the diffKDE. The bold blue line represents the default solution of the diffKDE by solving the diffusion equation up to the approximated optimal final iteration time <inline-formula><mml:math id="M434" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. The other colors depict more detailed prior approximation stages with smaller bandwidth, i.e., earlier iteration times, and a smoother estimate with a far larger iteration time.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f05.png"/>

        </fig>

      <?pagebreak page6622?><p id="d1e11488">In the following we only work with the default solution of the diffKDE at <inline-formula><mml:math id="M435" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>∗</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. We start with comparisons of the diffKDE and the three other popular KDEs directly to the underlying true distribution.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><?xmltex \currentcnt{6}?><?xmltex \def\figurename{Figure}?><label>Figure 6</label><caption><p id="d1e11504">Test cases with known distributions. Panels <bold>(a)</bold>–<bold>(c)</bold> show KDEs of random samples of the trimodal distribution defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>), <bold>(d)</bold>–<bold>(f)</bold> the same for a lognormal distribution. The left figure column is constructed from <inline-formula><mml:math id="M436" display="inline"><mml:mn mathvariant="normal">50</mml:mn></mml:math></inline-formula> random samples, the middle from <inline-formula><mml:math id="M437" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula>, and the right from <inline-formula><mml:math id="M438" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula>. In all plots the true distribution is drawn in gray in the background and the random data sample as gray dots on the <inline-formula><mml:math id="M439" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. Each panel shows four KDEs: the diffKDE, the Botev KDE, the Gaussian KDE, and the Epanechnikov KDE. In the labels of the KDEs are also the integrals over the interval <inline-formula><mml:math id="M440" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">12</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> given for each of the KDEs.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f06.png"/>

        </fig>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T3" specific-use="star"><?xmltex \currentcnt{3}?><label>Table 3</label><caption><p id="d1e11577">Integrals of the KDEs displayed in Figs. <xref ref-type="fig" rid="Ch1.F6"/> and <xref ref-type="fig" rid="Ch1.F7"/>.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="5">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="center"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Graphic</oasis:entry>
         <oasis:entry colname="col2">diffKDE</oasis:entry>
         <oasis:entry colname="col3">Botev KDE</oasis:entry>
         <oasis:entry colname="col4">Gaussian KDE</oasis:entry>
         <oasis:entry colname="col5">Epanechnikov KDE</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>a</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M441" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M442" display="inline"><mml:mn mathvariant="normal">0.999984</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M443" display="inline"><mml:mn mathvariant="normal">0.999984</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M444" display="inline"><mml:mn mathvariant="normal">0.999998</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>b</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M445" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M446" display="inline"><mml:mn mathvariant="normal">0.999999</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M447" display="inline"><mml:mn mathvariant="normal">0.999677</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M448" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>c</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M449" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M450" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M451" display="inline"><mml:mn mathvariant="normal">0.999989</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M452" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>d</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M453" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M454" display="inline"><mml:mn mathvariant="normal">0.999955</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M455" display="inline"><mml:mn mathvariant="normal">0.961448</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M456" display="inline"><mml:mn mathvariant="normal">0.999999</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>e</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M457" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M458" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M459" display="inline"><mml:mn mathvariant="normal">0.987128</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M460" display="inline"><mml:mn mathvariant="normal">0.999998</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F6"/>f</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M461" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M462" display="inline"><mml:mn mathvariant="normal">0.996</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M463" display="inline"><mml:mn mathvariant="normal">0.995571</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M464" display="inline"><mml:mn mathvariant="normal">0.996372</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>a</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M465" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M466" display="inline"><mml:mn mathvariant="normal">0.9986</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M467" display="inline"><mml:mn mathvariant="normal">0.894</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M468" display="inline"><mml:mn mathvariant="normal">0.9163</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>b</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M469" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M470" display="inline"><mml:mn mathvariant="normal">0.9094</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M471" display="inline"><mml:mn mathvariant="normal">0.802</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M472" display="inline"><mml:mn mathvariant="normal">0.8968</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>c</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M473" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M474" display="inline"><mml:mn mathvariant="normal">0.9999</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M475" display="inline"><mml:mn mathvariant="normal">0.9986</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M476" display="inline"><mml:mn mathvariant="normal">0.9617</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>d</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M477" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M478" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M479" display="inline"><mml:mn mathvariant="normal">0.9983</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M480" display="inline"><mml:mn mathvariant="normal">0.996</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>e</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M481" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M482" display="inline"><mml:mn mathvariant="normal">0.7703</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M483" display="inline"><mml:mn mathvariant="normal">0.0914</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M484" display="inline"><mml:mn mathvariant="normal">0.6171</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Fig. <xref ref-type="fig" rid="Ch1.F7"/>f</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M485" display="inline"><mml:mn mathvariant="normal">1.0</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M486" display="inline"><mml:mn mathvariant="normal">0.6825</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M487" display="inline"><mml:mn mathvariant="normal">0.0337</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M488" display="inline"><mml:mn mathvariant="normal">0.5718</mml:mn></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{3}?></table-wrap>

      <p id="d1e12106">We use differently sized random samples of the known distribution from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) and the standard lognormal distribution both over <inline-formula><mml:math id="M489" display="inline"><mml:mrow><mml:mfenced open="[" close="]"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">12</mml:mn></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> for a direct comparison of the accuracy of the KDEs. The random samples are <inline-formula><mml:math id="M490" display="inline"><mml:mn mathvariant="normal">50</mml:mn></mml:math></inline-formula>, <inline-formula><mml:math id="M491" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula>, and <inline-formula><mml:math id="M492" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula> data points of each distribution and all four KDEs are calculated and plotted together in Fig. <xref ref-type="fig" rid="Ch1.F6"/>. The underlying true distribution is plotted in the background to visually assess the approximation accuracy. In general, the diffKDE resolves more of the details of the structure of the true distribution while not being too sensitive to patterns introduced by the selection of the random sample and individual outliers. For the <inline-formula><mml:math id="M493" display="inline"><mml:mn mathvariant="normal">50</mml:mn></mml:math></inline-formula> random samples test of the trimodal distribution, all KDEs do not detect the third mode and only the diffKDE and the Epanechnikov KDE detect the second. The magnitude of the main mode is also best resolved by these two. In the <inline-formula><mml:math id="M494" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> random samples test of the trimodal distribution, the diffKDE and the Botev KDE are able to detect all three modes. The main mode is best resolved by the diffKDE, whereas the third mode is best resolved by the Botev KDE. In both test cases for the trimodal distribution, the Gaussian KDE is the smoothest and the Epanechnikov KDE provides the least smooth graph. In the <inline-formula><mml:math id="M495" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula> random samples test the diffKDE best detects the left mode and the Botev KDE best detects the two others. Generally, diffKDE and Botev KDE are closely aligned in this case. The Gaussian and Epanechnikov KDEs are also closely aligned but with a worse fit of all structures of the true distribution. The steep decline to <inline-formula><mml:math id="M496" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> is best reproduced by the diffKDE particularly with low random sample sizes. The Gaussian KDE always performs the worst. The Botev KDE is generally also close to the diffKDE but resolves in the tail of the distribution too much influence of individual outliers. In the <inline-formula><mml:math id="M497" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula> random samples test with the lognormal distribution are again diffKDE and Botev KDE closely aligned as well as Gaussian and Epanechnikov KDE. The first two are very close to the true distribution but resolve too much structure of the random sample. The diffKDE resolves more structure in the area close to <inline-formula><mml:math id="M498" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> and becomes smoother towards the tail of the distribution. The Botev KDE performs the other way around and provides a smoother estimate close to <inline-formula><mml:math id="M499" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> and more structure of the random sample towards higher data values. An analysis of the integral of the KDEs over the observed domain is presented in Table <xref ref-type="table" rid="Ch1.T3"/> and reveals that the diffKDE is the only one that integrates to <inline-formula><mml:math id="M500" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> in all test cases.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7" specific-use="star"><?xmltex \currentcnt{7}?><?xmltex \def\figurename{Figure}?><label>Figure 7</label><caption><p id="d1e12213">Lognormal test cases with different mean and variance parameters. Of each distribution <inline-formula><mml:math id="M501" display="inline"><mml:mn mathvariant="normal">300</mml:mn></mml:math></inline-formula> random samples were taken and the diffKDE, the Botev KDE, the Gaussian KDE, and the Epanechnikov KDE were calculated and plotted together with the true distribution. The random data sample is drawn as gray circles on the <inline-formula><mml:math id="M502" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. Panels <bold>(a)</bold> and <bold>(b)</bold> use <inline-formula><mml:math id="M503" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, <bold>(c)</bold> and <bold>(d)</bold> <inline-formula><mml:math id="M504" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn></mml:mrow></mml:math></inline-formula>, and <bold>(e)</bold> and <bold>(f)</bold> <inline-formula><mml:math id="M505" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> in their underlying normal distributions. The means of the underlying normal distributions are <inline-formula><mml:math id="M506" display="inline"><mml:mrow><mml:mi mathvariant="italic">μ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> in <bold>(a)</bold>, <bold>(c)</bold>, and <bold>(e)</bold>, and <inline-formula><mml:math id="M507" display="inline"><mml:mrow><mml:mi mathvariant="italic">μ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> in <bold>(b)</bold>, <bold>(d)</bold>, and <bold>(f)</bold>.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f07.png"/>

        </fig>

      <p id="d1e12335">We refined the test cases from Fig. <xref ref-type="fig" rid="Ch1.F6"/> by investigating a lognormal distribution with different parameters and a restriction to the interval <inline-formula><mml:math id="M508" display="inline"><mml:mrow><mml:mfenced close="]" open="["><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">12</mml:mn></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> in Fig. <xref ref-type="fig" rid="Ch1.F7"/>. We varied mean and variances of the normal distribution and used two different means and three different variances resulting in six test cases. All of them are run with <inline-formula><mml:math id="M509" display="inline"><mml:mn mathvariant="normal">300</mml:mn></mml:math></inline-formula> random samples and again with all four KDEs. The larger the variance becomes, the more structure of individual data points is resolved by the Botev KDE. The Gaussian KDE fails for increasing variance too, resulting in intense oversmoothing. The Epanechnikov KDE performs well for smaller variances and larger means, but it also oversmoothes in the other cases. The diffKDE is generally one of the closest to the true distribution while not resolving too much of the structure introduced by the choice of the random sample, especially for increased variances. But this too tends to resolve too much structure in the vicinity of the mode for smaller variances. The integrals of the KDEs are also presented in Table <xref ref-type="table" rid="Ch1.T3"/> and our implementation is again always exactly 1.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8" specific-use="star"><?xmltex \currentcnt{8}?><?xmltex \def\figurename{Figure}?><label>Figure 8</label><caption><p id="d1e12367">Test cases with different sample sizes. All four plots show the diffKDE of random samples of the known trimodal distribution defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>). Panel <bold>(a)</bold> is calculated from a subsample of <inline-formula><mml:math id="M510" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> data points, <bold>(b)</bold> <inline-formula><mml:math id="M511" display="inline"><mml:mrow><mml:mn mathvariant="normal">100</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mn mathvariant="normal">000</mml:mn></mml:mrow></mml:math></inline-formula>, <bold>(c)</bold> <inline-formula><mml:math id="M512" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mn mathvariant="normal">000</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mn mathvariant="normal">000</mml:mn></mml:mrow></mml:math></inline-formula>, and <bold>(d)</bold> <inline-formula><mml:math id="M513" display="inline"><mml:mrow><mml:mn mathvariant="normal">10</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mn mathvariant="normal">000</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mn mathvariant="normal">000</mml:mn></mml:mrow></mml:math></inline-formula>, all cut to the interval <inline-formula><mml:math id="M514" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">12</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> and hence lacking a few data points. The true numbers of incorporated data points in the four test cases are given in the respective subheadings. The measured computing time on a 2020 MacBook Air is also drawn in the respective label.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f08.png"/>

        </fig>

      <p id="d1e12455">Now we show the performance of the diffKDE on increasingly large data sets. We still use the trimodal distribution from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>). We start with four larger random data samples ranging from <inline-formula><mml:math id="M515" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> to <inline-formula><mml:math id="M516" display="inline"><mml:mn mathvariant="normal">10</mml:mn></mml:math></inline-formula> million data points of the trimodal distribution and then restrict ourselves to our core area of interest <inline-formula><mml:math id="M517" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">12</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>. We calculate the diffKDE from all of them as well as the respective runtime on a consumer laptop from 2020. We compare the results again to the true distribution in Fig. <xref ref-type="fig" rid="Ch1.F8"/>. All of the estimates could be calculated in less than 1 min. For <inline-formula><mml:math id="M518" display="inline"><mml:mn mathvariant="normal">100</mml:mn></mml:math></inline-formula> data points there is still an offset to the true distribution visible in the estimate. For the larger data samples the estimate only shows some minor uneven areas, which smooth out until the largest test case.</p>
      <p id="d1e12502">Furthermore, we investigated the convergence of the diffKDE to the true distribution, again in comparison with the three other KDEs. The error between the respective KDE and the true distribution is calculated by the Wasserstein distance <xref ref-type="bibr" rid="bib1.bibx37" id="paren.85"/> with <inline-formula><mml:math id="M519" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> by a SciPy function and the <inline-formula><mml:math id="M520" display="inline"><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow></mml:math></inline-formula> defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>). For the approximation of the expected value in Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) we applied an averaging of the integral value for 100 different random samples for each observed sample size. We used increasingly large random samples from the trimodal distribution starting with <inline-formula><mml:math id="M521" display="inline"><mml:mn mathvariant="normal">10</mml:mn></mml:math></inline-formula> and reaching up to <inline-formula><mml:math id="M522" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> million. The errors calculated for each of the KDEs on each of the random samples are listed in Table <xref ref-type="table" rid="App1.Ch1.S3.T4"/>. The values from Table <xref ref-type="table" rid="App1.Ch1.S3.T4"/> are visualized in Fig. <xref ref-type="fig" rid="Ch1.F9"/> on a log-scale. The diffKDE, the Gaussian, and the Botev show a similar steep decline, whereas the Epanechnikov KDE decreases its error much slower with increased sample size. The diffKDE and the Botev KDE generally show similar error values, the diffKDE relatively smaller ones on smaller data samples and the Botev KDE relatively smaller ones on data samples larger than around <inline-formula><mml:math id="M523" display="inline"><mml:mn mathvariant="normal">5000</mml:mn></mml:math></inline-formula>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9"><?xmltex \currentcnt{9}?><?xmltex \def\figurename{Figure}?><label>Figure 9</label><caption><p id="d1e12563">The evolution of the errors of the diffKDE, the Gaussian KDE, the Epanechnikov KDE, and the Botev KDE are drawn on a log scale against the increasing sample size on the <inline-formula><mml:math id="M524" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. Panel <bold>(a)</bold> shows the error calculated with the Wasserstein distance and <bold>(b)</bold> with the MISE. The MISE is calculated after Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) from 100 different random samples.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f09.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10" specific-use="star"><?xmltex \currentcnt{10}?><?xmltex \def\figurename{Figure}?><label>Figure 10</label><caption><p id="d1e12589">Noised data experiments. A random sample of <inline-formula><mml:math id="M525" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula> data points of the trimodal distribution is artificially noised by differing amounts of the standard deviation. Panel <bold>(a)</bold> shows the resulting diffKDEs of the differently noised data, <bold>(b)</bold> the Gaussian KDE, <bold>(c)</bold> the Botev KDE, and <bold>(d)</bold> the Epanechnikov KDE. In all four panels the original true distribution is drawn in gray in the background. The values of the error between the KDEs and the original true distribution are also part of the respective labels.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f10.png"/>

        </fig>

      <?pagebreak page6623?><p id="d1e12617">Finally, we investigated the noise sensitivity of the diffKDE compared with the three other KDEs on data containing artificially introduced noise. We again used the trimodal distribution from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) and <inline-formula><mml:math id="M526" display="inline"><mml:mn mathvariant="normal">1000</mml:mn></mml:math></inline-formula> random samples. From this, we created noised data <inline-formula><mml:math id="M527" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mi mathvariant="italic">θ</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>N</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> by
            <disp-formula id="Ch1.E40" content-type="numbered"><label>40</label><mml:math id="M528" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">X</mml:mi><mml:mi mathvariant="italic">θ</mml:mi></mml:msub><mml:msub><mml:mo>)</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">X</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="italic">τ</mml:mi></mml:msup><mml:mrow class="chem"><mml:mi mathvariant="normal">rand</mml:mi></mml:mrow><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mi mathvariant="italic">σ</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mtext> for all </mml:mtext><mml:mi>i</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1000</mml:mn><mml:mo mathvariant="italic">}</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          where <inline-formula><mml:math id="M529" display="inline"><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">5</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">30</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> defines the percentage of noise with respect to the standard deviation <inline-formula><mml:math id="M530" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M531" display="inline"><mml:mrow><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>∈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> was chosen randomly as well as <inline-formula><mml:math id="M532" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mo>∈</mml:mo><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>. The error is again expressed by the Wasserstein distance between the original probability density and the respective KDE. The results are visualized in Fig. <xref ref-type="fig" rid="Ch1.F10"/> with an individual panel for each KDE. The error of the Epanechnikov KDE is overall the largest and also increases to the largest. The Gaussian KDE produces the second largest error, but this even decreases with increased noise. The Botev KDE produces the smallest errors, but for increased noise this increases and approaches the magnitude of the one from the diffKDE. The error of the diffKDE only minimally responds to increased noise in the data. Visually, all four KDEs follow a similar pattern of a shift to the left of the graph. The Botev KDE additionally resolves more structure of the noised data as the noise increases.</p><?xmltex \hack{\newpage}?>
</sec>
</sec>
<?pagebreak page6624?><sec id="Ch1.S7">
  <label>7</label><title>Results on marine biogeochemical data and outlook to model calibration</title>
      <p id="d1e12841">The performance of the diffKDE is now illustrated with real data of (a) measurements of carbon isotopes <xref ref-type="bibr" rid="bib1.bibx64 bib1.bibx63" id="paren.86"/>, (b) of plankton size (equivalent spherical diameter) <xref ref-type="bibr" rid="bib1.bibx26" id="paren.87"/>, and (c) remote sensing data <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx48" id="paren.88"/>. We chose these data because we propose to apply the diffKDE for the analysis of field data for assessment and optimization of marine biogeochemical- as well as size-based ecosystem models. The carbon isotope data have been collected to constrain model parameter values of a marine biogeochemical model that incorporates this tracer as a prognostic variable <xref ref-type="bibr" rid="bib1.bibx50" id="paren.89"/>.</p>
      <p id="d1e12856">Both data sets were already analyzed using KDEs in their original publications <xref ref-type="bibr" rid="bib1.bibx63 bib1.bibx26" id="paren.90"/>. Here we expand these analyses by a comparison of the KDEs used in the respective publications to the new implementation of the diffKDE. For the <inline-formula><mml:math id="M533" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> data, the Gaussian KDE was the one used in the data description publication. Since we have already done this in Sect. <xref ref-type="sec" rid="Ch1.S6.SS2"/>, we furthermore added the Epanechnikov and the Botev KDEs to these graphics. For the plankton size spectra data, we only compared the diffKDE to the two Gaussian KDEs used in the respective publication to preserve the clarity of the resulting figures.</p>

      <?xmltex \floatpos{p}?><fig id="Ch1.F11" specific-use="star"><?xmltex \currentcnt{11}?><?xmltex \def\figurename{Figure}?><label>Figure 11</label><caption><p id="d1e12882">Comparison of KDE performance on marine biogeochemical field data. The <inline-formula><mml:math id="M534" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> data <xref ref-type="bibr" rid="bib1.bibx64" id="paren.91"/> are described in detail in <xref ref-type="bibr" rid="bib1.bibx63" id="text.92"/> and cover all major world oceans, the 1960s–2010s, and reaches down into the deep ocean. In all four panels the diffKDE is plotted together with the Gaussian, Epanechnikov, and Botev KDEs. Panel <bold>(a)</bold> shows KDEs from all available data, <bold>(b)</bold> shows the KDEs of the data restricted to the core data values of <inline-formula><mml:math id="M535" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">35</mml:mn><mml:mo>,</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>, <bold>(c)</bold> shows the KDEs from only euphotic zone data with values in <inline-formula><mml:math id="M536" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">35</mml:mn><mml:mo>,</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>, and <bold>(d)</bold> shows the KDEs from all 1990s data with values in <inline-formula><mml:math id="M537" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">35</mml:mn><mml:mo>,</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>.</p></caption>
        <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f11.png"/>

      </fig>

      <?xmltex \floatpos{p}?><fig id="Ch1.F12" specific-use="star"><?xmltex \currentcnt{12}?><?xmltex \def\figurename{Figure}?><label>Figure 12</label><caption><p id="d1e12991">Comparison of KDE performance on <bold>(a)</bold> phytoplankton and <bold>(b)</bold> microzooplankton size spectra. The construction of composite and combined size spectra is described in <xref ref-type="bibr" rid="bib1.bibx26" id="text.93"/> and based on Gaussian KDEs. Smoother combined spectra are the result of one KDE with a common bandwidth for all data. More structured composite spectra were assembled from taxon-specific spectra with individual, hence smaller, bandwidths.</p></caption>
        <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f12.png"/>

      </fig>

<?pagebreak page6625?><sec id="Ch1.S7.SS1">
  <label>7.1</label><title>Performance analyses on organic carbon-13 isotope data</title>
      <p id="d1e13016">The <inline-formula><mml:math id="M538" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> data <xref ref-type="bibr" rid="bib1.bibx64" id="paren.94"/> were collected to serve for direct data analyses as well as for future model assessments <xref ref-type="bibr" rid="bib1.bibx63" id="paren.95"/>. We show here the Gaussian KDE as it was used in the data publication in a direct comparison with the diffKDE. Furthermore, we added the Epanechnikov and the Botev KDEs. Since in this case no true known PDF is available, we have to compare the four estimates and subjectively judge their usefulness. In Fig. <xref ref-type="fig" rid="Ch1.F11"/> we show the KDEs on four different subsets of the <inline-formula><mml:math id="M539" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">12</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mtext>POC</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> data: (a) the full data set, (b) a restriction to the core data interval of <inline-formula><mml:math id="M540" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">35</mml:mn><mml:mo>,</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>, where 98.65 % of the data are located, and then even further restricted to (c) the euphotic zone and (d) only data sampled in the 1990s. The euphotic zone describes the upper ocean layer with sufficient light to enable photosynthesis that produces organic matter <xref ref-type="bibr" rid="bib1.bibx25" id="paren.96"/>. While its depth can vary in nature <xref ref-type="bibr" rid="bib1.bibx60" id="paren.97"/>, here we pragmatically selected included data in the upper 130 <inline-formula><mml:math id="M541" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">m</mml:mi></mml:mrow></mml:math></inline-formula> consistent with the analysis in the data set description (Verwega et al. 2021). In all three cases that involve deep ocean measurements, the Botev KDE produces strong oscillations while the Gaussian KDE strongly smoothes the dip between the modes at around <inline-formula><mml:math id="M542" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">24</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M543" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">22</mml:mn></mml:mrow></mml:math></inline-formula> and mostly the one between around <inline-formula><mml:math id="M544" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">28</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M545" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">24</mml:mn></mml:mrow></mml:math></inline-formula>. The Epanechnikov KDE resolves more structure than the Gaussian, but is less pronounced than the diffKDE. Especially in the full data analysis, the diffKDE reveals the most structure while not resolving smaller data features of individual data points. The KDEs from the euphotic zone data are all reasonably smooth. The Gaussian KDE is again the smoothest and missing the mode at <inline-formula><mml:math id="M546" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">22</mml:mn></mml:mrow></mml:math></inline-formula> completely. The other three KDEs resolve a similar amount of data structure. The Botev KDE reveals a better distinction between the modes at around <inline-formula><mml:math id="M547" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">POC</mml:mi></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">24</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M548" display="inline"><mml:mrow><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">12</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mtext>POC</mml:mtext></mml:msub></mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mn mathvariant="normal">22</mml:mn></mml:mrow></mml:math></inline-formula> while the diffKDE shows the first one more pronounced. These observations are consistent with those from the experiments from Figs. <xref ref-type="fig" rid="Ch1.F7"/> and <xref ref-type="fig" rid="Ch1.F10"/>, where especially the Gaussian and the Botev KDEs struggle with the resolution of data with increasing variances or noise. Of the four observed <inline-formula><mml:math id="M549" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi mathvariant="italic">δ</mml:mi><mml:mn mathvariant="normal">12</mml:mn></mml:msup><mml:msub><mml:mi mathvariant="normal">C</mml:mi><mml:mtext>POC</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> data sets here, the euphotic zone data shown in Fig. <xref ref-type="fig" rid="Ch1.F11"/>c have the smallest standard deviation, <inline-formula><mml:math id="M550" display="inline"><mml:mn mathvariant="normal">7.78</mml:mn></mml:math></inline-formula>. The other shown data have variances of <inline-formula><mml:math id="M551" display="inline"><mml:mn mathvariant="normal">13.91</mml:mn></mml:math></inline-formula>, <inline-formula><mml:math id="M552" display="inline"><mml:mn mathvariant="normal">10.96</mml:mn></mml:math></inline-formula>, and <inline-formula><mml:math id="M553" display="inline"><mml:mn mathvariant="normal">9.61</mml:mn></mml:math></inline-formula> in Fig. <xref ref-type="fig" rid="Ch1.F11"/>a, b, and d, respectively.</p>
</sec>
<sec id="Ch1.S7.SS2">
  <label>7.2</label><title>Performance analyses on plankton size spectra data</title>
      <p id="d1e13318">Another example demonstrates the performance of the diffKDE if applied to plankton size data <xref ref-type="bibr" rid="bib1.bibx26" id="paren.98"/>. <?pagebreak page6626?> The data of size and abundance of protist plankton was originally collected for resolving changes in plankton community size structure, providing complementary insight for investigations of plankton dynamics and organic matter flux <xref ref-type="bibr" rid="bib1.bibx32" id="paren.99"><named-content content-type="pre">e.g.,</named-content></xref>.  In the study of <xref ref-type="bibr" rid="bib1.bibx26" id="text.100"/> a KDE was applied for the derivation of continuous size spectra of phytoplankton and microzooplankton that can potentially be used for the calibration and assessment of size-based plankton ecosystem models. In their study they used a Gaussian KDE, as proposed in <xref ref-type="bibr" rid="bib1.bibx49" id="text.101"/>, but with two different approaches for generating plankton size spectra.  Uncertainties, also with respect to optimal bandwidth selection, were accounted for in both approaches by analyzing ensembles of pseudo-data resampled from original microscopic measurements.  Smooth plankton spectra were obtained using the <italic>combined</italic> approach, where all phytoplankton and all zooplankton data were lumped together, respectively, and single bandwidths were calculated for every ensemble member (set of resampled data). This procedure avoided overfitting but was also prone to oversmoothing, which can mask details such as troughs in specific size ranges. More details in the size spectra were resolved with a <italic>composite</italic> approach, where individual size spectra, calculated for each species or genus, were assembled. Since the variance within species or genus groups is smaller than within the large groups “phytoplankton” or “zooplankton”, the individual bandwidths, and therefore the degree of smoothing, were considerably smaller than obtained in the combined approach. This computationally expensive method revealed many details in the spectra but at the same time tended to resolve narrow peaks that were either clearly insignificant or remained difficult to interpret (see supplemental material in <xref ref-type="bibr" rid="bib1.bibx26" id="altparen.102"/>). The here proposed diffKDE was tested with resampled data used for the simpler <italic>combined</italic> approach. The objective was to identify details in the size spectra that remained previously unresolved while insignificant peaks, as found in the composite approach, became smoothed out. Figure <xref ref-type="fig" rid="Ch1.F12"/> shows the performance of the diffKDE in comparison with the original combined and composite spectra that were derived as ensemble means of estimates obtained with a Gaussian KDE. The spatial discretization of the diffKDE was set to <inline-formula><mml:math id="M554" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1000</mml:mn></mml:mrow></mml:math></inline-formula> to be comparable to the other already published KDEs in this case. The diffKDE seems to meaningfully combine the advantages of the two Gaussian KDE approaches in both spectra, of the phytoplankton and microzooplankton, respectively. With the diffKDE it is possible to generate estimates that display more detailed structure of the composite KDE. This becomes obvious in some size ranges, such as between 5 and 50 <inline-formula><mml:math id="M555" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula>m, in particular in the microzooplankton spectrum. Concurrently, detailed variations, as caused by overfitting in the composite spectra, become suppressed for cell sizes larger than 10 <inline-formula><mml:math id="M556" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula>m. Thus, with the diffKDE it is possible to generate a single robust estimate that otherwise is only achieved by analyzing a composite of a series of individual estimates of a Gaussian KDE. The application of the diffKDE for analyzing details in plankton size spectra, or generally in particle size spectra, reduces computational efforts considerably.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F13" specific-use="star"><?xmltex \currentcnt{13}?><?xmltex \def\figurename{Figure}?><label>Figure 13</label><caption><p id="d1e13379">Comparison of KDE performance using monthly means (February, March, and April) of chlorophyll <inline-formula><mml:math id="M557" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> concentration derived from remote sensing data of the year 2019. The PDFs <bold>(a)</bold>–<bold>(c)</bold> represent the temporal development of spatial variability seen in a subregion of the Mauritanian upwelling system <bold>(d)</bold>–<bold>(f)</bold>.</p></caption>
          <?xmltex \igopts{width=483.69685pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/16/6609/2023/gmd-16-6609-2023-f13.png"/>

        </fig>

</sec>
<sec id="Ch1.S7.SS3">
  <label>7.3</label><title>Performance analyses on remote sensing data</title>
      <p id="d1e13415">Our last example refers to PDFs that reflect temporal changes (monthly means) of surface chlorophyll <inline-formula><mml:math id="M558" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> concentration within an off-shore ocean region (approximately 350 <inline-formula><mml:math id="M559" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 330 <inline-formula><mml:math id="M560" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">km</mml:mi></mml:mrow></mml:math></inline-formula>) that exhibits substantial mesoscale and submesoscale variability. The selected area is part of the of the Mauritanian upwelling system, located at the Moroccan coast of North Africa.  This eastern boundary upwelling is known for the formation and spread of filaments, with some distinct characteristics in terms of the spatial variability in temperature and the distribution of plankton <xref ref-type="bibr" rid="bib1.bibx56 bib1.bibx45 bib1.bibx62" id="paren.103"><named-content content-type="pre">e.g.,</named-content></xref>.  For this example we use remote sensing (satellite) data of monthly mean chlorophyll <inline-formula><mml:math id="M561" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> concentration from the year<?pagebreak page6627?> 2019, as processed and made available through the Ocean-Colour Climate Change Initiative (OC-CCI) <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx48" id="paren.104"/>.  We deliberately chose 3 months in which an eddy-like filamentous structure of elevated chlorophyll <inline-formula><mml:math id="M562" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> concentration developed after February and then evolved during a 2-month period (March and April).  Such development reveals specific spatial patterns, of low and increased chlorophyll <inline-formula><mml:math id="M563" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula>, which leave a clear imprint in the corresponding PDFs, as depicted in Fig. <xref ref-type="fig" rid="Ch1.F13"/>.  In Fig. <xref ref-type="fig" rid="Ch1.F13"/> we find multiple modes, as well as a shift towards low chlorophyll <inline-formula><mml:math id="M564" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> concentrations that are much better resolved when the diffKDE is applied.  Such details derived with the diffKDE could be compared to complementary PDFs, for example, as obtained from remote sensing sea surface temperature data within the same time period, and we might gain further insight into the underlying processes involved in generating distinctive spatial and temporal patterns.  Also, in cases of simulations of mesoscale and submesoscale processes, we should not expect to obtain a model solution with filamentous structures at identical times at the same places. However, we may regard a model's performance as credible if the model's solution yields similar spatial structures visually within the same region, perhaps at some different time, and the associated PDFs may then be directly assessed against the PDFs obtained from the remote sensing data.</p>
</sec>
<sec id="Ch1.S7.SS4">
  <label>7.4</label><title>Future application to model assessment and calibration</title>
      <p id="d1e13489">In geoscientific research, the derivation and comparison of well-resolved PDFs can be useful, as demonstrated in our selected examples. Yet, the significance of resolving details in non-parametric PDFs remains unclear. However, having high resolution PDFs available, as obtained with the diffKDE, is readily of value and will likely guide further research. An obvious benefit of the diffKDE is its lesser dependence on the specification of a single, albeit optimal, bandwidth. Its application is likely more robust for the assessment of simulation results, either against data or results of other models (e.g., multimodel ensembles), which is particularly relevant for evaluations of future climate projections obtained with earth system models <xref ref-type="bibr" rid="bib1.bibx34" id="paren.105"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
      <?pagebreak page6629?><p id="d1e13497">Comparison of model and field data requires additional processing to account for spatial–temporal differences between collected samples and model resolution. Typically, simulation results are available at every single spatial grid point and in every time step. In comparison, field data are usually sparsely available only. Interpolating such sparse field data can introduce high uncertainty <xref ref-type="bibr" rid="bib1.bibx34" id="paren.106"><named-content content-type="pre">e.g.,</named-content></xref>. PDFs provide a useful approach to investigate data independent of the number of data points available <xref ref-type="bibr" rid="bib1.bibx59" id="paren.107"/>. A comparison of two such functions can easily resolve the issue of non-equal field observations and simulation results. Histograms are commonly used as an approach to compare and ultimately constrain the distribution of model data to observations. However, many issues arise including the subjective selection of intervals and histograms not being proper PDFs themselves.</p>
      <p id="d1e13508">The presented diffKDE provides a non-parametric approach to estimate PDFs with typical features of geoscientific data. Being able to resolve typical patterns, such as multiple or boundary-close modes, while being insensitive to noise and individual outliers makes the diffKDE a suitable tool for future work in the calibration and optimization of earth system models.</p>
</sec>
</sec>
<sec id="Ch1.S8" sec-type="conclusions">
  <label>8</label><title>Summary and conclusions</title>
      <p id="d1e13520">In this study we constructed and tested an estimator (KDE) of probability density functions (PDFs) that can be applied for analyzing geoscientifc and ecological data. KDEs allow the investigation of data with respect to their probability distribution, and PDFs can be derived even for sparse data. To be well suited for geoscientific data, the KDE must work fast and reliably on differently sized data sets while revealing multimodal details as well as features near data boundaries. A KDE should not be overly sensitive to noise introduced by measurement errors or by numerical uncertainties. Such an estimator can be applied for direct data analyses or can be used to construct a target function for model assessment and calibration.</p>
      <p id="d1e13523">We presented a novel implementation of a KDE based on the diffusion heat process (diffKDE). This idea was originally proposed by <xref ref-type="bibr" rid="bib1.bibx8" id="text.108"/> and its benefits in comparison with traditional KDE approaches were widely investigated by <xref ref-type="bibr" rid="bib1.bibx5" id="text.109"/>. We chose this approach to KDE because it offers three main benefits: (1) consistency at the boundaries, (2) better resolution of<?pagebreak page6630?> multimodal data, and (3) a family of KDEs with different smoothing intensities. We provide our algorithm in an open source Python package. Our approach includes a new approximation of the bandwidth, which equals the square root of the final iteration time. We directly approximate the analytical solution of the optimal bandwidth with two pilot estimation steps and finite differences. We calculate the pilot estimates as solutions of a simplified diffusion equation up until final iteration times derived from literature-based bandwidths called <italic>rule of thumb</italic> by <xref ref-type="bibr" rid="bib1.bibx55" id="text.110"/>. Our new approach results in three subsequent estimations of the PDF, each of them chosen with a finer bandwidth approximation.</p>
      <p id="d1e13538">Finite differences build the fundamentals of our discretization. The spatial discretization comprises equidistant finite differences. The <inline-formula><mml:math id="M565" display="inline"><mml:mi mathvariant="italic">δ</mml:mi></mml:math></inline-formula> distribution in the initial value is discretized by piecewise linear functions along the spatial discretization points constructing a Dirac sequence. For the time stepping we applied an implicit Eulerian algorithm on an ordinary differential equation set up by a tridiagonal matrix corresponding to the diffusion equation on the spatial equidistant grid.</p>
      <p id="d1e13548">Our diffKDE implementation includes pre-implemented default output options. The first option is the visualization of the diffusion time evolution showing the sequence of all solution steps from the initial values to the final diffKDE. This lets a user view the influence of individual data points and outlier accumulations on the final diffKDE and how this decreases over time. The second option is the visualization of the pilot estimate that is also included in the partial differential equation to introduce adaptive smoothing properties. This provides the user with easy insight into the adaptive smoothing as well as the lower boundary of structure resolution given by this parameter function. Finally, an interactive plot provides a simple opportunity to explore all of these time iterations and look even beyond the optimal bandwidth and see smoother estimates.</p>
      <p id="d1e13552">Our implementation is fast and reliable on differently sized and multimodal data sets. We tested the implementation for up to 10 million data points and obtained acceptably fast results. A comparison of the diffKDE on known distributions together with classically employed KDEs showed reliable and often superior performance. For comparison we chose a SciPy implementation <xref ref-type="bibr" rid="bib1.bibx16" id="paren.111"/> of the most classical Gaussian KDE <xref ref-type="bibr" rid="bib1.bibx53" id="paren.112"/>, an Scikit implementation <xref ref-type="bibr" rid="bib1.bibx39" id="paren.113"/> of an Epanechnikov KDE <xref ref-type="bibr" rid="bib1.bibx51" id="paren.114"/> and a Python implementation <xref ref-type="bibr" rid="bib1.bibx20" id="paren.115"/> of the improved Gaussian KDE developed by <xref ref-type="bibr" rid="bib1.bibx5" id="text.116"/>. We designed multimodal and different boundary-close distributions and found our implementation to generate the most reliable estimates across a wide range of sample sizes (Fig. <xref ref-type="fig" rid="Ch1.F9"/>). The diffKDE was neither prone to oversmoothing nor overfitting of the data, which we could observe in the other tested KDEs. A noise sensitivity test in comparison with the other KDEs also showed a good stability of the diffKDE against noise in the data.</p>
      <p id="d1e13576">An assessment of the diffKDE on real marine biogeochemical field data in comparison with usually employed KDEs reveals superior performance of the diffKDE. We used carbon isotope and plankton size spectra data and compared the diffKDE to the KDEs that were used to explore the data in the respective original data publications. On the carbon isotope data, we furthermore applied all previous KDEs for comparison. In both cases we were able to show that the diffKDE resolves relevant features of the data while not being sensitive to individual outliers or uncertainties (noise) in the data. We were able to obtain a best possible and reliable representation of the true data distribution, better than those derived with other KDEs.</p>
      <p id="d1e13579">In future studies the diffKDE may potentially be used for the assessment, calibration, and optimization of marine biogeochemical- and earth system models. A plot comprising PDFs of field data and simulation results already may provide visual insight into some shortcomings of the applied model. A target function can be constructed by adding a distance like the Wasserstein distance <xref ref-type="bibr" rid="bib1.bibx37" id="paren.117"/> or other useful metrics for the calibration of climate models that can be investigated <xref ref-type="bibr" rid="bib1.bibx59" id="paren.118"/>. Thus, KDE applications, such as our diffKDE, can greatly simplify comparisons of differently sized field and simulation data sets.</p>
</sec>

      
      </body>
    <back><app-group>

<app id="App1.Ch1.S1">
  <?xmltex \currentcnt{A}?><label>Appendix A</label><title>Optimal bandwidth choice for the general KDE</title>
      <p id="d1e13599">The derivation of the optimal bandwidth choice for a KDE was already described in <xref ref-type="bibr" rid="bib1.bibx38" id="text.119"/> and can be found in more detail in <xref ref-type="bibr" rid="bib1.bibx55" id="text.120"/>. The additional conditions stated in Eq. (<xref ref-type="disp-formula" rid="Ch1.E7"/>) to the kernel function
          <disp-formula id="App1.Ch1.S1.E41" content-type="numbered"><label>A1</label><mml:math id="M566" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:mi>y</mml:mi><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mtext> and </mml:mtext><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi></mml:munder><mml:msup><mml:mi>y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>∈</mml:mo><mml:mi mathvariant="double-struck">R</mml:mi><mml:mo>∖</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></disp-formula>
        correspond to the order of the kernel being equal to <inline-formula><mml:math id="M567" display="inline"><mml:mn mathvariant="normal">2</mml:mn></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx2" id="paren.121"/>. For such kernels <xref ref-type="bibr" rid="bib1.bibx55" id="text.122"/> showed the minimizer of the asymptotic mean integrated squared error to be
          <disp-formula id="App1.Ch1.S1.E42" content-type="numbered"><label>A2</label><mml:math id="M568" display="block"><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mo>∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="normal">∞</mml:mi></mml:msubsup><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="normal">d</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msubsup><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:msubsup><mml:mo>∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow><mml:mi mathvariant="normal">∞</mml:mi></mml:msubsup><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:mi>K</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msubsup><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <?pagebreak page6631?><p id="d1e13853">In our context of working with the squared bandwidth <inline-formula><mml:math id="M569" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> this optimal bandwidth choice becomes
          <disp-formula id="App1.Ch1.S1.E43" content-type="numbered"><label>A3</label><mml:math id="M570" display="block"><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:mi>K</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:msubsup><mml:mi>k</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mi mathvariant="normal">|</mml:mi><mml:msup><mml:mi>f</mml:mi><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:msubsup><mml:mi mathvariant="normal">|</mml:mi><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:mfrac></mml:mstyle></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        which equals Eq. (<xref ref-type="disp-formula" rid="Ch1.E13"/>). <?xmltex \hack{\newpage}?></p>
</app>

<app id="App1.Ch1.S2">
  <?xmltex \currentcnt{B}?><label>Appendix B</label><title>Integral property of the Dirac sequence</title>
      <p id="d1e13959">Here, we briefly give the proof of the integral property of the used Dirac sequence <inline-formula><mml:math id="M571" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> defined in Eq. (<xref ref-type="disp-formula" rid="Ch1.E36"/>). Let <inline-formula><mml:math id="M572" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>. Then we obtain

              <disp-formula specific-use="align"><mml:math id="M573" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo movablelimits="false">∫</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>×</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi>h</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi>h</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi>h</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p><?xmltex \hack{\clearpage}?>
</app>

<?pagebreak page6632?><app id="App1.Ch1.S3">
  <?xmltex \currentcnt{C}?><label>Appendix C</label><title>Error convergence of observed KDEs</title>
      <p id="d1e14740">Table <xref ref-type="table" rid="App1.Ch1.S3.T4"/> shows the error values calculated by the Wasserstein distance and the MISE between the true distribution and the respective KDEs. The used distribution is the trimodal from Eq. (<xref ref-type="disp-formula" rid="Ch1.E39"/>) and the values plotted in Fig. <xref ref-type="fig" rid="Ch1.F9"/>.</p>

<?xmltex \floatpos{h!}?><table-wrap id="App1.Ch1.S3.T4"><?xmltex \hack{\hsize\textwidth}?><?xmltex \currentcnt{C1}?><label>Table C1</label><caption><p id="d1e14753">Error convergence of the observed KDEs in Fig. <xref ref-type="fig" rid="Ch1.F9"/>. The first column lists the sample sizes used for the calculation in each row. The following four lines show the error between the four observed KDEs and the true distribution calculated by the Wasserstein distance. The final four columns contain the equivalent errors, but calculated by the MISE.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="9">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:colspec colnum="7" colname="col7" align="right"/>
     <oasis:colspec colnum="8" colname="col8" align="right"/>
     <oasis:colspec colnum="9" colname="col9" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Sample size</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M574" display="inline"><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mtext>diffKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M575" display="inline"><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mtext>BKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M576" display="inline"><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mtext>GKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M577" display="inline"><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mtext>EKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6"><inline-formula><mml:math id="M578" display="inline"><mml:mrow><mml:msub><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mtext>diffKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col7"><inline-formula><mml:math id="M579" display="inline"><mml:mrow><mml:msub><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mtext>BKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col8"><inline-formula><mml:math id="M580" display="inline"><mml:mrow><mml:msub><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mtext>GKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col9"><inline-formula><mml:math id="M581" display="inline"><mml:mrow><mml:msub><mml:mrow class="chem"><mml:mi mathvariant="normal">MISE</mml:mi></mml:mrow><mml:mtext>EKDE</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">0.0235</oasis:entry>
         <oasis:entry colname="col3">0.0362</oasis:entry>
         <oasis:entry colname="col4">0.0266</oasis:entry>
         <oasis:entry colname="col5">0.0273</oasis:entry>
         <oasis:entry colname="col6">0.0313</oasis:entry>
         <oasis:entry colname="col7">0.0544</oasis:entry>
         <oasis:entry colname="col8">0.04</oasis:entry>
         <oasis:entry colname="col9">0.0327</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">50</oasis:entry>
         <oasis:entry colname="col2">0.0181</oasis:entry>
         <oasis:entry colname="col3">0.0248</oasis:entry>
         <oasis:entry colname="col4">0.0218</oasis:entry>
         <oasis:entry colname="col5">0.0202</oasis:entry>
         <oasis:entry colname="col6">0.012</oasis:entry>
         <oasis:entry colname="col7">0.0133</oasis:entry>
         <oasis:entry colname="col8">0.0246</oasis:entry>
         <oasis:entry colname="col9">0.0098</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">100</oasis:entry>
         <oasis:entry colname="col2">0.0042</oasis:entry>
         <oasis:entry colname="col3">0.0072</oasis:entry>
         <oasis:entry colname="col4">0.0137</oasis:entry>
         <oasis:entry colname="col5">0.007</oasis:entry>
         <oasis:entry colname="col6">0.0074</oasis:entry>
         <oasis:entry colname="col7">0.0075</oasis:entry>
         <oasis:entry colname="col8">0.019</oasis:entry>
         <oasis:entry colname="col9">0.0068</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">150</oasis:entry>
         <oasis:entry colname="col2">0.0066</oasis:entry>
         <oasis:entry colname="col3">0.0094</oasis:entry>
         <oasis:entry colname="col4">0.0153</oasis:entry>
         <oasis:entry colname="col5">0.0093</oasis:entry>
         <oasis:entry colname="col6">0.0057</oasis:entry>
         <oasis:entry colname="col7">0.0059</oasis:entry>
         <oasis:entry colname="col8">0.016</oasis:entry>
         <oasis:entry colname="col9">0.0062</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">200</oasis:entry>
         <oasis:entry colname="col2">0.0078</oasis:entry>
         <oasis:entry colname="col3">0.0089</oasis:entry>
         <oasis:entry colname="col4">0.0152</oasis:entry>
         <oasis:entry colname="col5">0.0097</oasis:entry>
         <oasis:entry colname="col6">0.0045</oasis:entry>
         <oasis:entry colname="col7">0.0046</oasis:entry>
         <oasis:entry colname="col8">0.0141</oasis:entry>
         <oasis:entry colname="col9">0.0057</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">300</oasis:entry>
         <oasis:entry colname="col2">0.0053</oasis:entry>
         <oasis:entry colname="col3">0.0062</oasis:entry>
         <oasis:entry colname="col4">0.0139</oasis:entry>
         <oasis:entry colname="col5">0.0085</oasis:entry>
         <oasis:entry colname="col6">0.003</oasis:entry>
         <oasis:entry colname="col7">0.0032</oasis:entry>
         <oasis:entry colname="col8">0.0116</oasis:entry>
         <oasis:entry colname="col9">0.0051</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">400</oasis:entry>
         <oasis:entry colname="col2">0.0036</oasis:entry>
         <oasis:entry colname="col3">0.0048</oasis:entry>
         <oasis:entry colname="col4">0.0115</oasis:entry>
         <oasis:entry colname="col5">0.0081</oasis:entry>
         <oasis:entry colname="col6">0.0024</oasis:entry>
         <oasis:entry colname="col7">0.0025</oasis:entry>
         <oasis:entry colname="col8">0.0098</oasis:entry>
         <oasis:entry colname="col9">0.0047</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">500</oasis:entry>
         <oasis:entry colname="col2">0.0027</oasis:entry>
         <oasis:entry colname="col3">0.0032</oasis:entry>
         <oasis:entry colname="col4">0.0106</oasis:entry>
         <oasis:entry colname="col5">0.0076</oasis:entry>
         <oasis:entry colname="col6">0.0021</oasis:entry>
         <oasis:entry colname="col7">0.0024</oasis:entry>
         <oasis:entry colname="col8">0.009</oasis:entry>
         <oasis:entry colname="col9">0.0049</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">750</oasis:entry>
         <oasis:entry colname="col2">0.0036</oasis:entry>
         <oasis:entry colname="col3">0.0034</oasis:entry>
         <oasis:entry colname="col4">0.01</oasis:entry>
         <oasis:entry colname="col5">0.0081</oasis:entry>
         <oasis:entry colname="col6">0.0015</oasis:entry>
         <oasis:entry colname="col7">0.0016</oasis:entry>
         <oasis:entry colname="col8">0.007</oasis:entry>
         <oasis:entry colname="col9">0.0045</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">1000</oasis:entry>
         <oasis:entry colname="col2">0.0032</oasis:entry>
         <oasis:entry colname="col3">0.0024</oasis:entry>
         <oasis:entry colname="col4">0.0093</oasis:entry>
         <oasis:entry colname="col5">0.0079</oasis:entry>
         <oasis:entry colname="col6">0.0011</oasis:entry>
         <oasis:entry colname="col7">0.0013</oasis:entry>
         <oasis:entry colname="col8">0.006</oasis:entry>
         <oasis:entry colname="col9">0.0044</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">2000</oasis:entry>
         <oasis:entry colname="col2">0.0024</oasis:entry>
         <oasis:entry colname="col3">0.0017</oasis:entry>
         <oasis:entry colname="col4">0.0074</oasis:entry>
         <oasis:entry colname="col5">0.0077</oasis:entry>
         <oasis:entry colname="col6">0.0006</oasis:entry>
         <oasis:entry colname="col7">0.0008</oasis:entry>
         <oasis:entry colname="col8">0.0039</oasis:entry>
         <oasis:entry colname="col9">0.0043</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">5000</oasis:entry>
         <oasis:entry colname="col2">0.0015</oasis:entry>
         <oasis:entry colname="col3">0.0019</oasis:entry>
         <oasis:entry colname="col4">0.0058</oasis:entry>
         <oasis:entry colname="col5">0.008</oasis:entry>
         <oasis:entry colname="col6">0.0003</oasis:entry>
         <oasis:entry colname="col7">0.0004</oasis:entry>
         <oasis:entry colname="col8">0.0022</oasis:entry>
         <oasis:entry colname="col9">0.0042</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10 000</oasis:entry>
         <oasis:entry colname="col2">0.002</oasis:entry>
         <oasis:entry colname="col3">0.0019</oasis:entry>
         <oasis:entry colname="col4">0.0044</oasis:entry>
         <oasis:entry colname="col5">0.0079</oasis:entry>
         <oasis:entry colname="col6">0.0002</oasis:entry>
         <oasis:entry colname="col7">0.0002</oasis:entry>
         <oasis:entry colname="col8">0.0013</oasis:entry>
         <oasis:entry colname="col9">0.0041</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">50 000</oasis:entry>
         <oasis:entry colname="col2">0.0011</oasis:entry>
         <oasis:entry colname="col3">0.0009</oasis:entry>
         <oasis:entry colname="col4">0.0024</oasis:entry>
         <oasis:entry colname="col5">0.0081</oasis:entry>
         <oasis:entry colname="col6">0.00006</oasis:entry>
         <oasis:entry colname="col7">0.00007</oasis:entry>
         <oasis:entry colname="col8">0.0004</oasis:entry>
         <oasis:entry colname="col9">0.0041</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">100 000</oasis:entry>
         <oasis:entry colname="col2">0.0007</oasis:entry>
         <oasis:entry colname="col3">0.0006</oasis:entry>
         <oasis:entry colname="col4">0.0018</oasis:entry>
         <oasis:entry colname="col5">0.0082</oasis:entry>
         <oasis:entry colname="col6">0.00004</oasis:entry>
         <oasis:entry colname="col7">0.00004</oasis:entry>
         <oasis:entry colname="col8">0.0002</oasis:entry>
         <oasis:entry colname="col9">0.0041</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">500 000</oasis:entry>
         <oasis:entry colname="col2">0.0005</oasis:entry>
         <oasis:entry colname="col3">0.0004</oasis:entry>
         <oasis:entry colname="col4">0.0011</oasis:entry>
         <oasis:entry colname="col5">0.0084</oasis:entry>
         <oasis:entry colname="col6">0.00002</oasis:entry>
         <oasis:entry colname="col7">0.00001</oasis:entry>
         <oasis:entry colname="col8">0.00007</oasis:entry>
         <oasis:entry colname="col9">0.0041</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">1 000 000</oasis:entry>
         <oasis:entry colname="col2">0.0005</oasis:entry>
         <oasis:entry colname="col3">0.0003</oasis:entry>
         <oasis:entry colname="col4">0.00081</oasis:entry>
         <oasis:entry colname="col5">0.0084</oasis:entry>
         <oasis:entry colname="col6">0.00001</oasis:entry>
         <oasis:entry colname="col7">0.000007</oasis:entry>
         <oasis:entry colname="col8">0.00004</oasis:entry>
         <oasis:entry colname="col9">0.0041</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{C1}?></table-wrap>

<?xmltex \hack{\clearpage}?>
</app>
  </app-group><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d1e15431">The exact version of the diffKDE implementation <xref ref-type="bibr" rid="bib1.bibx41" id="paren.123"/> used to produce the results used in this paper is archived on Zenodo: <ext-link xlink:href="https://doi.org/10.5281/zenodo.7594915" ext-link-type="DOI">10.5281/zenodo.7594915</ext-link>. The underlying research data are carbon isotope data (<xref ref-type="bibr" rid="bib1.bibx64" id="altparen.124"/>) accessible at <ext-link xlink:href="https://doi.org/10.1594/PANGAEA.929931" ext-link-type="DOI">10.1594/PANGAEA.929931</ext-link>, plankton size spectra data (<xref ref-type="bibr" rid="bib1.bibx26" id="altparen.125"/>), which will be made available via institutional (GEOMAR) repository and can be requested from Vanessa Lampe, vlampe@geomar.de, and remote sensing data (<xref ref-type="bibr" rid="bib1.bibx47" id="altparen.126"/>). The monthly means version 5 data (chla_a) were downloaded from and are available at: <uri>https://rsg.pml.ac.uk/thredds/ncss/grid/CCI_ALL-v5.0-MONTHLY/dataset.html</uri> <xref ref-type="bibr" rid="bib1.bibx48" id="paren.127"/>.</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e15462">MTP structured the manuscript and developed the implementation of the diffusion-based kernel density estimator. VL conducted the comparison experiments with the plankton size spectra. MS conducted the comparison experiments with the remote sensing data. CJS edited the manuscript. MS and TS edited the manuscript and supported the development of the implementation of the diffusion-based kernel density estimator.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e15469">The contact author has declared that none of the authors has any competing interests.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <p id="d1e15475">Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e15481">The editor and the authors thank two anonymous reviewers for their comments on this article.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e15486">The first author is funded through the Helmholtz School for Marine Data Science (MarDATA), grant No. HIDSS-0005.<?xmltex \hack{\newline}?><?xmltex \hack{\newline}?> The article processing charges for this open-access <?xmltex \notforhtml{\newline}?>publication were covered by the GEOMAR Helmholtz Centre <?xmltex \notforhtml{\newline}?>for Ocean Research Kiel.</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e15499">This paper was edited by Travis O'Brien and reviewed by two anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><?xmltex \def\ref@label{{Abramson(1982)}}?><label>Abramson(1982)</label><?label abramson?><mixed-citation>Abramson, I. S.: On bandwidth variation in kernel estimates-a square root law, Ann. Stat., pp. 1217–1223, <ext-link xlink:href="https://doi.org/10.1214/aos/1176345986" ext-link-type="DOI">10.1214/aos/1176345986</ext-link>, 1982.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Berlinet(1993)}}?><label>Berlinet(1993)</label><?label Berlinet1993?><mixed-citation>Berlinet, A.: Hierarchies of higher order kernels, Prob. Theory Rel., 94, 489–504, <ext-link xlink:href="https://doi.org/10.1007/bf01192560" ext-link-type="DOI">10.1007/bf01192560</ext-link>, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx3"><?xmltex \def\ref@label{{Bernacchia and Pigolotti(2011)}}?><label>Bernacchia and Pigolotti(2011)</label><?label Bernacchia2011?><mixed-citation>Bernacchia, A. and Pigolotti, S.: Self-Consistent Method for Density Estimation, J. R. Stat. Soc. B, 73, 407–422, <ext-link xlink:href="https://doi.org/10.1111/j.1467-9868.2011.00772.x" ext-link-type="DOI">10.1111/j.1467-9868.2011.00772.x</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx4"><?xmltex \def\ref@label{{Boccara(1990)}}?><label>Boccara(1990)</label><?label Boccara?><mixed-citation> Boccara, N.: Functional Analysis – An Introduction for Physicists, Academic Press, Inc., ISBN 0121088103, 1990.</mixed-citation></ref>
      <ref id="bib1.bibx5"><?xmltex \def\ref@label{{Botev et~al.(2010)Botev, Grotowski, and Kroese}}?><label>Botev et al.(2010)Botev, Grotowski, and Kroese</label><?label botev?><mixed-citation>Botev, Z. I., Grotowski, J. F., and Kroese, D. P.: Kernel density estimation via diffusion, Ann. Stat., 38, 2916–2957, <ext-link xlink:href="https://doi.org/10.1214/10-AOS799" ext-link-type="DOI">10.1214/10-AOS799</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx6"><?xmltex \def\ref@label{{Breiman et~al.(1977)Breiman, Meisel, and Purcell}}?><label>Breiman et al.(1977)Breiman, Meisel, and Purcell</label><?label breiman?><mixed-citation> Breiman, L., Meisel, W., and Purcell, E.: Variable kernel estimates of multivariate densities, Technometrics, 19, 135–144, 1977.</mixed-citation></ref>
      <ref id="bib1.bibx7"><?xmltex \def\ref@label{{Chac{\'{o}}n and Duong(2018)}}?><label>Chacón and Duong(2018)</label><?label chacon2018?><mixed-citation> Chacón, J. E. and Duong, T.: Multivariate kernel smoothing and its applications, CRC Press, ISBN 1498763014, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx8"><?xmltex \def\ref@label{{Chaudhuri and Marron(2000)}}?><label>Chaudhuri and Marron(2000)</label><?label chaudhuri?><mixed-citation>Chaudhuri, P. and Marron, J.: Scale space view of curve estimation, Ann. Stat., 28, 408–428, <ext-link xlink:href="https://doi.org/10.1214/aos/1016218224" ext-link-type="DOI">10.1214/aos/1016218224</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx9"><?xmltex \def\ref@label{{Chung et~al.(2018)Chung, Khaki, Chu, and Gadh}}?><label>Chung et al.(2018)Chung, Khaki, Chu, and Gadh</label><?label chung?><mixed-citation>Chung, Y.-W., Khaki, B., Chu, C., and Gadh, R.: Electric Vehicle User Behavior Prediction Using Hybrid Kernel Density Estimator, in: 2018 IEEE International Conference on Probabilistic Methods Applied to Power Systems (PMAPS), Boise, Idaho, USA, 24–28 June 2018,  1–6, <ext-link xlink:href="https://doi.org/10.1109/PMAPS.2018.8440360" ext-link-type="DOI">10.1109/PMAPS.2018.8440360</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx10"><?xmltex \def\ref@label{{Davies and Baddeley(2017)}}?><label>Davies and Baddeley(2017)</label><?label Davies2017?><mixed-citation>Davies, T. M. and Baddeley, A.: Fast computation of spatially adaptive kernel estimates, Stat. Comput., 28, 937–956, <ext-link xlink:href="https://doi.org/10.1007/s11222-017-9772-4" ext-link-type="DOI">10.1007/s11222-017-9772-4</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx11"><?xmltex \def\ref@label{{Dekking et~al.(2005)Dekking, Kraaikamp, Lopuha\"{a}, and Meester}}?><label>Dekking et al.(2005)Dekking, Kraaikamp, Lopuhaä, and Meester</label><?label Dekking2005?><mixed-citation>Dekking, F. M., Kraaikamp, C., Lopuhaä, H. P., and Meester, L. E.: A Modern Introduction to Probability and Statistics, Springer London, <ext-link xlink:href="https://doi.org/10.1007/1-84628-168-7" ext-link-type="DOI">10.1007/1-84628-168-7</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx12"><?xmltex \def\ref@label{{Deniz et~al.(2011)Deniz, Cardanobile, and Rotter}}?><label>Deniz et al.(2011)Deniz, Cardanobile, and Rotter</label><?label deniz?><mixed-citation>Deniz, T., Cardanobile, S., and Rotter, S.: A PYTHON Package for Kernel Smoothing via Diffusion: Estimation of Spike Train Firing Rate, Front. Comput. Neurosci. Conference Abstract: BC11 : Computational Neuroscience &amp; Neurotechnology Bernstein Conference &amp; Neurex Annual Meeting 2011, Bernstein Center, Freiburg, Germany, 4–6 October 2011, 5, <ext-link xlink:href="https://doi.org/10.3389/conf.fncom.2011.53.00071" ext-link-type="DOI">10.3389/conf.fncom.2011.53.00071</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx13"><?xmltex \def\ref@label{{Dessai et~al.(2005)Dessai, Lu, and Hulme}}?><label>Dessai et al.(2005)Dessai, Lu, and Hulme</label><?label Dessai_etal2005?><mixed-citation>Dessai, S., Lu, X., and Hulme, M.: Limited sensitivity analysis of regional climate change probabilities for the 21st century, J. Geophys. Res.-Atmos., 110,  D19108, <ext-link xlink:href="https://doi.org/10.1029/2005JD005919" ext-link-type="DOI">10.1029/2005JD005919</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx14"><?xmltex \def\ref@label{{Dirac(1927)}}?><label>Dirac(1927)</label><?label dirac?><mixed-citation>Dirac, P. A. M.: The physical interpretation of the quantum dynamics, P. R. Soc. A-Conta., 113, 621–641, <ext-link xlink:href="https://doi.org/10.1098/rspa.1927.0012" ext-link-type="DOI">10.1098/rspa.1927.0012</ext-link>, 1927.</mixed-citation></ref>
      <ref id="bib1.bibx15"><?xmltex \def\ref@label{{Farmer and Jacobs(2022)}}?><label>Farmer and Jacobs(2022)</label><?label farmer?><mixed-citation>Farmer, J. and Jacobs, D. J.: MATLAB tool for probability density assessment and nonparametric estimation, SoftwareX, 18, 101017, <ext-link xlink:href="https://doi.org/10.1016/j.softx.2022.101017" ext-link-type="DOI">10.1016/j.softx.2022.101017</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx16"><?xmltex \def\ref@label{{Gommers et~al.(2022)Gommers, Virtanen, Burovski, Weckesser, Oliphant, Cournapeau, Haberland, Reddy, alexbrc, Peterson, Nelson, Wilson, endolith, Mayorov, Polat, van der Walt, Laxalde, Brett, Larson, Millman, Lars, peterbell10, Roy, van Mulbregt, Carey, eric jones, Sakai, Moore, Kai, and Kern}}?><label>Gommers et al.(2022)Gommers, Virtanen, Burovski, Weckesser, Oliphant, Cournapeau, Haberland, Reddy, alexbrc, Peterson, Nelson, Wilson, endolith, Mayorov, Polat, van der Walt, Laxalde, Brett, Larson, Millman, Lars, peterbell10, Roy, van Mulbregt, Carey, eric jones, Sakai, Moore, Kai, and Kern</label><?label SciPy?><mixed-citation>Gommers, R., Virtanen, P., Burovski, E., Weckesser, W., Oliphant, T. E., Cournapeau, D., Haberland, M., Reddy, T., alexbrc, Peterson, P., Nelson, A., Wilson, J., endolith, Mayorov, N., Polat, I., van der Walt, S., Laxalde, D., Brett, M., Larson, E., Millman, J., Lars, peterbell10, Roy, P., van Mulbregt, P., Carey, C., eric jones, Sakai, A., Moore, E., Kai, and Kern, R.: scipy/scipy: SciPy 1.8.0, Zenodo, <ext-link xlink:href="https://doi.org/10.5281/zenodo.5979747" ext-link-type="DOI">10.5281/zenodo.5979747</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx17"><?xmltex \def\ref@label{{Gramacki(2018)}}?><label>Gramacki(2018)</label><?label Gramacki2018?><mixed-citation>Gramacki, A.: Nonparametric Kernel Density Estimation and Its Computational Aspects, Springer International Publishing, <ext-link xlink:href="https://doi.org/10.1007/978-3-319-71688-6" ext-link-type="DOI">10.1007/978-3-319-71688-6</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx18"><?xmltex \def\ref@label{{Harris et~al.(2020)Harris, Millman, van der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del R{\'{i}}o, Wiebe, Peterson, G{\'{e}}rard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant}}?><label>Harris et al.(2020)Harris, Millman, van der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del Río, Wie<?pagebreak page6634?>be, Peterson, Gérard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant</label><?label Numpy?><mixed-citation>Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M. H., Brett, M., Haldane, A., del Río, J. F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.: Array programming with NumPy, Nature, 585, 357–362, <ext-link xlink:href="https://doi.org/10.1038/s41586-020-2649-2" ext-link-type="DOI">10.1038/s41586-020-2649-2</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{{Heidenreich et~al.(2013)Heidenreich, Schindler, and Sperlich}}?><label>Heidenreich et al.(2013)Heidenreich, Schindler, and Sperlich</label><?label Heidenreich2013?><mixed-citation>Heidenreich, N.-B., Schindler, A., and Sperlich, S.: Bandwidth selection for kernel density estimation: a review of fully automatic selectors, AStA-Adv. Stat. Anal., 97, 403–433, <ext-link xlink:href="https://doi.org/10.1007/s10182-013-0216-y" ext-link-type="DOI">10.1007/s10182-013-0216-y</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx20"><?xmltex \def\ref@label{{Hennig(2021)}}?><label>Hennig(2021)</label><?label hennig?><mixed-citation>Hennig, J.: John-Hennig/KDE-diffusion: KDE-diffusion 1.0.3, Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/zenodo.4663430" ext-link-type="DOI">10.5281/zenodo.4663430</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx21"><?xmltex \def\ref@label{{Hirsch and Lacombe(1999)}}?><label>Hirsch and Lacombe(1999)</label><?label Hirsch?><mixed-citation> Hirsch, F. and Lacombe, G.: Elements of Functional Analysis, Springer, ISBN 9781461271468, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx22"><?xmltex \def\ref@label{{Hunter(2007)}}?><label>Hunter(2007)</label><?label Matplotlib?><mixed-citation>Hunter, J. D.: Matplotlib: A 2D graphics environment, Comput. Sci. Eng., 9, 90–95, <ext-link xlink:href="https://doi.org/10.1109/mcse.2007.55" ext-link-type="DOI">10.1109/mcse.2007.55</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx23"><?xmltex \def\ref@label{{Jones et~al.(1996)Jones, Marron, and Sheather}}?><label>Jones et al.(1996)Jones, Marron, and Sheather</label><?label Jones1996?><mixed-citation>Jones, M. C., Marron, J. S., and Sheather, S. J.: A Brief Survey of Bandwidth Selection for Density Estimation, J. Am. Stat. Assoc., 91, 401–407, <ext-link xlink:href="https://doi.org/10.1080/01621459.1996.10476701" ext-link-type="DOI">10.1080/01621459.1996.10476701</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx24"><?xmltex \def\ref@label{{Khorramdel et~al.(2018)Khorramdel, Chung, Safari, and Price}}?><label>Khorramdel et al.(2018)Khorramdel, Chung, Safari, and Price</label><?label Khorramdel2018?><mixed-citation>Khorramdel, B., Chung, C. Y., Safari, N., and Price, G. C. D.: A Fuzzy Adaptive Probabilistic Wind Power Prediction Framework Using Diffusion Kernel Density Estimators, IEEE T. Power Syst., 33, 7109–7121, <ext-link xlink:href="https://doi.org/10.1109/tpwrs.2018.2848207" ext-link-type="DOI">10.1109/tpwrs.2018.2848207</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx25"><?xmltex \def\ref@label{{Kirk(2011)}}?><label>Kirk(2011)</label><?label kirk?><mixed-citation> Kirk, J. T. O.: Light and Photosynthesis in Aquatic Ecosystems, third edn., Cambridge Univ. Press, ISBN 9780521151757, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx26"><?xmltex \def\ref@label{{Lampe et~al.(2021)Lampe, N\"{o}thig, and Schartau}}?><label>Lampe et al.(2021)Lampe, Nöthig, and Schartau</label><?label lampe?><mixed-citation>Lampe, V., Nöthig, E.-M., and Schartau, M.: Spatio-Temporal Variations in Community Size Structure of Arctic Protist Plankton in the Fram Strait, Front. in Mar. Sci., 7, 579880, <ext-link xlink:href="https://doi.org/10.3389/fmars.2020.579880" ext-link-type="DOI">10.3389/fmars.2020.579880</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx27"><?xmltex \def\ref@label{{Li et~al.(2019)Li, Lu, Bian, Qin, and Wu}}?><label>Li et al.(2019)Li, Lu, Bian, Qin, and Wu</label><?label Li2019?><mixed-citation>Li, G., Lu, W., Bian, J., Qin, F., and Wu, J.: Probabilistic Optimal Power Flow Calculation Method Based on Adaptive Diffusion Kernel Density Estimation, Frontiers in Energy Research, 7, 128, <ext-link xlink:href="https://doi.org/10.3389/fenrg.2019.00128" ext-link-type="DOI">10.3389/fenrg.2019.00128</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx28"><?xmltex \def\ref@label{{Ma et~al.(2019)Ma, Sun, Wang, and Wang}}?><label>Ma et al.(2019)Ma, Sun, Wang, and Wang</label><?label ma?><mixed-citation>Ma, S., Sun, S., Wang, B., and Wang, N.: Estimating load spectra probability distributions of train bogie frames by the diffusion-based kernel density method, International Journal of Fatigue, 132, 105352, <ext-link xlink:href="https://doi.org/10.1016/j.ijfatigue.2019.105352" ext-link-type="DOI">10.1016/j.ijfatigue.2019.105352</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx29"><?xmltex \def\ref@label{{Majdara and Nooshabadi(2020)}}?><label>Majdara and Nooshabadi(2020)</label><?label Majdara2020?><mixed-citation>Majdara, A. and Nooshabadi, S.: Nonparametric Density Estimation Using Copula Transform, Bayesian Sequential Partitioning, and Diffusion-Based Kernel Estimator, IEEE T. Knowl. Data En., 32, 821–826, <ext-link xlink:href="https://doi.org/10.1109/tkde.2019.2930052" ext-link-type="DOI">10.1109/tkde.2019.2930052</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx30"><?xmltex \def\ref@label{{Marron and Ruppert(1994)}}?><label>Marron and Ruppert(1994)</label><?label marron1994?><mixed-citation>Marron, J. S. and Ruppert, D.: Transformations to reduce boundary bias in kernel density estimation, J. Roy. Stat. Soc. B-Met., 56, 653–671, <uri>https://www.jstor.org/stable/2346189</uri> (last access: 15 December 2022), 1994.</mixed-citation></ref>
      <ref id="bib1.bibx31"><?xmltex \def\ref@label{{McSwiggan et~al.(2016)McSwiggan, Baddeley, and Nair}}?><label>McSwiggan et al.(2016)McSwiggan, Baddeley, and Nair</label><?label mcswiggan?><mixed-citation>McSwiggan, G., Baddeley, A., and Nair, G.: Kernel Density Estimation on a Linear Network, Scand. J. Stat., 44, 324–345, <ext-link xlink:href="https://doi.org/10.1111/sjos.12255" ext-link-type="DOI">10.1111/sjos.12255</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx32"><?xmltex \def\ref@label{{N\"{o}thig et~al.(2015)N\"{o}thig, Bracher, Engel, Metfies, Niehoff, Peeken, Bauerfeind, Cherkasheva, G\"{a}bler-Schwarz, Hardge, Kilias, Kraft, Mebrahtom Kidane, Lalande, Piontek, Thomisch, and Wurst}}?><label>Nöthig et al.(2015)Nöthig, Bracher, Engel, Metfies, Niehoff, Peeken, Bauerfeind, Cherkasheva, Gäbler-Schwarz, Hardge, Kilias, Kraft, Mebrahtom Kidane, Lalande, Piontek, Thomisch, and Wurst</label><?label Nothig2015?><mixed-citation>Nöthig, E.-M., Bracher, A., Engel, A., Metfies, K., Niehoff, B., Peeken, I., Bauerfeind, E., Cherkasheva, A., Gäbler-Schwarz, S., Hardge, K., Kilias, E., Kraft, A., Mebrahtom Kidane, Y., Lalande, C., Piontek, J., Thomisch, K., and Wurst, M.: Summertime plankton ecology in Fram Strait – a compilation of long- and short-term observations, Polar Res., 34, 23349, <ext-link xlink:href="https://doi.org/10.3402/polar.v34.23349" ext-link-type="DOI">10.3402/polar.v34.23349</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx33"><?xmltex \def\ref@label{{O'Brien et~al.(2019)O'Brien, O'Brien, Patricola, and Wang}}?><label>O'Brien et al.(2019)O'Brien, O'Brien, Patricola, and Wang</label><?label OBrien2019?><mixed-citation>O'Brien, J. P., O'Brien, T. A., Patricola, C. M., and Wang, S.-Y. S.: Metrics for understanding large-scale controls of multivariate temperature and precipitation variability, Clim. Dynam., 53, 3805–3823, <ext-link xlink:href="https://doi.org/10.1007/s00382-019-04749-6" ext-link-type="DOI">10.1007/s00382-019-04749-6</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{{Oliver et~al.(2022)Oliver, Cartis, Kriest, Tett, and Khatiwala}}?><label>Oliver et al.(2022)Oliver, Cartis, Kriest, Tett, and Khatiwala</label><?label Oliver2022?><mixed-citation>Oliver, S., Cartis, C., Kriest, I., Tett, S. F. B., and Khatiwala, S.: A derivative-free optimisation method for global ocean biogeochemical models, Geosci. Model Dev., 15, 3537–3554, <ext-link xlink:href="https://doi.org/10.5194/gmd-15-3537-2022" ext-link-type="DOI">10.5194/gmd-15-3537-2022</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{Ongoma et~al.(2017)Ongoma, Chen, Gao, and Sagero}}?><label>Ongoma et al.(2017)Ongoma, Chen, Gao, and Sagero</label><?label Ongoma2017?><mixed-citation>Ongoma, V., Chen, H., Gao, C., and Sagero, P. O.: Variability of temperature properties over Kenya based on observed and reanalyzed datasets, Theor. Appl. Climatol., 133, 1175–1190, <ext-link xlink:href="https://doi.org/10.1007/s00704-017-2246-y" ext-link-type="DOI">10.1007/s00704-017-2246-y</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{{Palmer(2012)}}?><label>Palmer(2012)</label><?label Palmer2012?><mixed-citation>Palmer, T. N.: Towards the probabilistic Earth-system simulator: a vision for the future of climate and weather prediction, Q. J. Roy. Meteor. Soc., 138, 841–861, <ext-link xlink:href="https://doi.org/10.1002/qj.1923" ext-link-type="DOI">10.1002/qj.1923</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx37"><?xmltex \def\ref@label{{Panaretos and Zemel(2019)}}?><label>Panaretos and Zemel(2019)</label><?label panaretos?><mixed-citation>Panaretos, V. M. and Zemel, Y.: Statistical Aspects of Wasserstein Distances, Annu. Rev. Stat. Appl., 6, 405–431, <ext-link xlink:href="https://doi.org/10.1146/annurev-statistics-030718-104938" ext-link-type="DOI">10.1146/annurev-statistics-030718-104938</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx38"><?xmltex \def\ref@label{{Parzen(1962)}}?><label>Parzen(1962)</label><?label parzen?><mixed-citation> Parzen, E.: On estimation of a probability density function and mode, Ann Math. Stat., 33, 1065–1076, 1962.</mixed-citation></ref>
      <ref id="bib1.bibx39"><?xmltex \def\ref@label{{Pedregosa et~al.(2012)Pedregosa, Varoquaux, Gramfort, Michel, Thirion, Grisel, Blondel, M\"{u}ller, Nothman, Louppe, Prettenhofer, Weiss, Dubourg, Vanderplas, Passos, Cournapeau, Brucher, Perrot, and Duchesnay}}?><label>Pedregosa et al.(2012)Pedregosa, Varoquaux, Gramfort, Michel, Thirion, Grisel, Blondel, Müller, Nothman, Louppe, Prettenhofer, Weiss, Dubourg, Vanderplas, Passos, Cournapeau, Brucher, Perrot, and Duchesnay</label><?label Scikit?><mixed-citation>Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Müller, A., Nothman, J., Louppe, G., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E.: Scikit-learn: Machine Learning in Python, Cornell Unversity, <ext-link xlink:href="https://doi.org/10.48550/ARXIV.1201.0490" ext-link-type="DOI">10.48550/ARXIV.1201.0490</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx40"><?xmltex \def\ref@label{{Pedretti and Fern{\`{a}}ndez-Garcia(2013)}}?><label>Pedretti and Fernàndez-Garcia(2013)</label><?label Pedretti2013?><mixed-citation>Pedretti, D. and Fernàndez-Garcia, D.: An automatic locally-adaptive method to estimate heavily-tailed breakthrough curves from particle distributions, Adv. Water Resour., 59, 52–65, <ext-link xlink:href="https://doi.org/10.1016/j.advwatres.2013.05.006" ext-link-type="DOI">10.1016/j.advwatres.2013.05.006</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{{Pelz and Slawig(2023)}}?><label>Pelz and Slawig(2023)</label><?label pelzKDE?><mixed-citation>Pelz, M.-T. and Slawig, T.: Diffusion-based kernel density estimator (diffKDE), Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/ZENODO.7594915" ext-link-type="DOI">10.5281/ZENODO.7594915</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx42"><?xmltex \def\ref@label{{Perkins et~al.(2007)Perkins, Pitman, and McAneney}}?><label>Perkins et al.(2007)Perkins, Pitman, and McAneney</label><?label Perkins_etal2007?><mixed-citation>Perkins, S. E., Pitman, A. J., and McAneney, N. J. H. J.: Evaluation of the AR4 Climate Models' Simulated Daily Maximum Temperature, Minimum Temperature, and Precipitation over Australia Using Probability Density Functions, J. Climate, 20, 4356–4376, <ext-link xlink:href="https://doi.org/10.1175/JCLI4253.1" ext-link-type="DOI">10.1175/JCLI4253.1</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx43"><?xmltex \def\ref@label{{Qin and Xiao(2018)}}?><label>Qin and Xiao(2018)</label><?label quin?><mixed-citation>Qin, B. and Xiao, F.: A Non-Parametric Method to Determine Basic Probability Assignment Based on Kernel Density Estimation, IEEE Access, 6, 73509–73519, <ext-link xlink:href="https://doi.org/10.1109/ACCESS.2018.2883513" ext-link-type="DOI">10.1109/ACCESS.2018.2883513</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx44"><?xmltex \def\ref@label{{Quintana et~al.(2008)Quintana, Brucet, Boix, L\'{o}pez-Flores, Gasc\'{o}n, Badosa, Sala, Moreno-Amich, and Egozcue}}?><label>Quintana et al.(2008)Quintana, Brucet, Boix, López-Flores, Gascón, Badosa, Sala, Moreno-Amich, and Egozcue</label><?label Quintana_etal2008?><mixed-citation>Quintana, X. D., Brucet, S., Boix, D., López-Flores, R., Gascón, S., Badosa, A., Sala, J., Moreno-Amich, R., and Egozcue, J. J.: A nonparametric method for the measurement of size diversity with emphasis on data standardization, Limnol. Oceanogr.-Meth., 6, 75–86, <ext-link xlink:href="https://doi.org/10.4319/lom.2008.6.75" ext-link-type="DOI">10.4319/lom.2008.6.75</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx45"><?xmltex \def\ref@label{{Romero et~al.(2020)Romero, Baumann, Zonneveld, Donner, Hefter, Hamady, Pospelova, and Fischer}}?><label>Romero et al.(2020)Romero, Baumann, Zonneveld, Donner, Hefter, Hamady, Pospelova, and Fischer</label><?label Romero_etal2020?><mixed-citation>Romero, O. E., Baumann, K.-H., Zonneveld, K. A. F., Donner, B., Hefter, J., Hamady, B., Pospelova, V., and Fischer, G.: Flux variability of phyto- and zooplankton communities in the Mauritanian coastal upwelling between 2003 and 2008, Biogeosciences, 17, 187–214, <ext-link xlink:href="https://doi.org/10.5194/bg-17-187-2020" ext-link-type="DOI">10.5194/bg-17-187-2020</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx46"><?xmltex \def\ref@label{{Santhosh and Srinivas(2013)}}?><label>Santhosh and Srinivas(2013)</label><?label Santhosh2013?><mixed-citation>Santhosh, D. and Srinivas, V. V.: Bivariate frequency analysis of floods using a diffusion based kernel density estimator, Water Resour. Res., 49, 8328–8343, <ext-link xlink:href="https://doi.org/10.1002/2011wr010777" ext-link-type="DOI">10.1002/2011wr010777</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx47"><?xmltex \def\ref@label{{Sathyendranath et~al.(2019)Sathyendranath, Brewin, Brockmann, Brotas, Calton, Chuprin, Cipollini, Couto, Dingle, Doerffer, Donlon, Dowell, Farman, Grant, Groom, Horseman, Jackson, Krasemann, Lavender, Martinez-Vicente, Mazeran, M{\'{e}}lin, Moore, M{\"{u}}ller, Regner, Roy, Steele, Steinmetz, Swinton, Taberner, Thompson, Valente, Z{\"{u}}hlke, Brando, Feng, Feldman, Franz, Frouin, Gould, Hooker, Kahru, Kratzer, Mitchell, Muller-Karger, Sosik, Voss, Werdell, and Platt}}?><label>Sathyendranath et al.(2019)Sathyendranath, Brewin, Brockmann, Brotas, Calton, Chuprin, Cipollini, Couto, Dingle, Doerffer, Donlon, Dowell, Farman, Grant<?pagebreak page6635?>, Groom, Horseman, Jackson, Krasemann, Lavender, Martinez-Vicente, Mazeran, Mélin, Moore, Müller, Regner, Roy, Steele, Steinmetz, Swinton, Taberner, Thompson, Valente, Zühlke, Brando, Feng, Feldman, Franz, Frouin, Gould, Hooker, Kahru, Kratzer, Mitchell, Muller-Karger, Sosik, Voss, Werdell, and Platt</label><?label Sathyendranath_etal2019?><mixed-citation>Sathyendranath, S., Brewin, R. J., Brockmann, C., Brotas, V., Calton, B., Chuprin, A., Cipollini, P., Couto, A. B., Dingle, J., Doerffer, R., Donlon, C., Dowell, M., Farman, A., Grant, M., Groom, S., Horseman, A., Jackson, T., Krasemann, H., Lavender, S., Martinez-Vicente, V., Mazeran, C., Mélin, F., Moore, T. S., Müller, D., Regner, P., Roy, S., Steele, C. J., Steinmetz, F., Swinton, J., Taberner, M., Thompson, A., Valente, A., Zühlke, M., Brando, V. E., Feng, H., Feldman, G., Franz, B. A., Frouin, R., Gould, R. W., Hooker, S. B., Kahru, M., Kratzer, S., Mitchell, B. G., Muller-Karger, F. E., Sosik, H. M., Voss, K. J., Werdell, J., and Platt, T.: An Ocean-Colour Time Series for Use in Climate Studies: The Experience of the Ocean-Colour Climate Change Initiative (OC-CCI), Sensors, 19, 4285, <ext-link xlink:href="https://doi.org/10.3390/s19194285" ext-link-type="DOI">10.3390/s19194285</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx48"><?xmltex \def\ref@label{{Sathyendranath et~al.(2021)Sathyendranath, Jackson, Brockmann, Brotas, Calton, Chuprin, Clements, Cipollini, Danne, Dingle, Donlon, Grant, Groom, Krasemann, Lavender, Mazeran, M{e}lin, M\"{u}ller, Steinmetz, Valente, Z\"{u}hlke, Feldman, Franz, Frouin, Werdell, and Platt}}?><label>Sathyendranath et al.(2021)Sathyendranath, Jackson, Brockmann, Brotas, Calton, Chuprin, Clements, Cipollini, Danne, Dingle, Donlon, Grant, Groom, Krasemann, Lavender, Mazeran, Melin, Müller, Steinmetz, Valente, Zühlke, Feldman, Franz, Frouin, Werdell, and Platt</label><?label Sathyendranath_etal2021_data_product?><mixed-citation>Sathyendranath, S., Jackson, T., Brockmann, C., Brotas, V., Calton, B., Chuprin, A., Clements, O., Cipollini, P., Danne, O., Dingle, J., Donlon, C., Grant, M., Groom, S., Krasemann, H., Lavender, S., Mazeran, C., Melin, F., Müller, D., Steinmetz, F., Valente, A., Zühlke, M., Feldman, G., Franz, B., Frouin, R., Werdell, J., and Platt, T.: Global chlorophyll-a data products gridded on a geographic projection, Version 5.0, NERC EDS Centre for Environmental Data Analysis [data set], <ext-link xlink:href="https://doi.org/10.5285/1dbe7a109c0244aaad713e078fd3059a" ext-link-type="DOI">10.5285/1dbe7a109c0244aaad713e078fd3059a</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx49"><?xmltex \def\ref@label{{Schartau et~al.(2010)Schartau, Landry, and Armstrong}}?><label>Schartau et al.(2010)Schartau, Landry, and Armstrong</label><?label Schartau2010?><mixed-citation>Schartau, M., Landry, M. R., and Armstrong, R. A.: Density estimation of plankton size spectra: a reanalysis of IronEx II data, J. Plankton Res., 32, 1167–1184, <ext-link xlink:href="https://doi.org/10.1093/plankt/fbq072" ext-link-type="DOI">10.1093/plankt/fbq072</ext-link>, iSBN: 0142-7873, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx50"><?xmltex \def\ref@label{{Schmittner and Somes(2016)}}?><label>Schmittner and Somes(2016)</label><?label SchmittnerSomes2016?><mixed-citation>Schmittner, A. and Somes, C. J.: Complementary constraints from carbon (<inline-formula><mml:math id="M582" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi/><mml:mn mathvariant="normal">13</mml:mn></mml:msup><mml:mi mathvariant="normal">C</mml:mi></mml:mrow></mml:math></inline-formula>) and nitrogen (<inline-formula><mml:math id="M583" display="inline"><mml:mrow class="chem"><mml:msup><mml:mi/><mml:mn mathvariant="normal">15</mml:mn></mml:msup><mml:mi mathvariant="normal">N</mml:mi></mml:mrow></mml:math></inline-formula>) isotopes on the glacial ocean's soft-tissue biological pump, Paleoceanography, 31, 669–693, <ext-link xlink:href="https://doi.org/10.1002/2015PA002905" ext-link-type="DOI">10.1002/2015PA002905</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx51"><?xmltex \def\ref@label{{Scott(1992)}}?><label>Scott(1992)</label><?label Scott1992?><mixed-citation>Scott, D. W.: Multivariate density estimation: theory, practice, and visualization, John Wiley &amp; Sons, <ext-link xlink:href="https://doi.org/10.1002/9780470316849" ext-link-type="DOI">10.1002/9780470316849</ext-link>, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx52"><?xmltex \def\ref@label{{Scott(2012)}}?><label>Scott(2012)</label><?label scott2012?><mixed-citation>Scott, D. W.: Multivariate density estimation and visualization, in: Handbook of computational statistics, Springer,  549–569, <ext-link xlink:href="https://doi.org/10.1007/978-3-642-21551-3_19" ext-link-type="DOI">10.1007/978-3-642-21551-3_19</ext-link>,  2012.</mixed-citation></ref>
      <ref id="bib1.bibx53"><?xmltex \def\ref@label{{Sheather(2004)}}?><label>Sheather(2004)</label><?label Sheather2004?><mixed-citation>Sheather, S. J.: Density Estimation, Stat. Sci., 19, 588–597, <ext-link xlink:href="https://doi.org/10.1214/088342304000000297" ext-link-type="DOI">10.1214/088342304000000297</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx54"><?xmltex \def\ref@label{{Sheather and Jones(1991)}}?><label>Sheather and Jones(1991)</label><?label sheather1991?><mixed-citation> Sheather, S. J. and Jones, M. C.: A reliable data-based bandwidth selection method for kernel density estimation, J. Roy. Stat. Soc. B-Meth., 53, 683–690, 1991.</mixed-citation></ref>
      <ref id="bib1.bibx55"><?xmltex \def\ref@label{{Silverman(1986)}}?><label>Silverman(1986)</label><?label silverman1986?><mixed-citation> Silverman, B.: Density estimation, Monographs on Statistics and Applied Probability, Springer, ISBN 9780412246203, 1986.</mixed-citation></ref>
      <ref id="bib1.bibx56"><?xmltex \def\ref@label{{Sylla et~al.(2019)Sylla, Mignot, Capet, and Gaye}}?><label>Sylla et al.(2019)Sylla, Mignot, Capet, and Gaye</label><?label Sylla_etal2019?><mixed-citation>Sylla, A., Mignot, J., Capet, X., and Gaye, A. T.: Weakening of the Senegalo–Mauritanian upwelling system under climate change, Clim. Dynam., 53, 4447–4473, <ext-link xlink:href="https://doi.org/10.1007/s00382-019-04797-y" ext-link-type="DOI">10.1007/s00382-019-04797-y</ext-link>, 2019. </mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx57"><?xmltex \def\ref@label{{Terrell and Scott(1992)}}?><label>Terrell and Scott(1992)</label><?label terrell1992?><mixed-citation>Terrell, G. R. and Scott, D. W.: Variable kernel density estimation, Ann. Stat., 20, 1236–1265, <uri>https://www.jstor.org/stable/2242011</uri> (last access: 15 December 2022), 1992.</mixed-citation></ref>
      <ref id="bib1.bibx58"><?xmltex \def\ref@label{{Teshome and Zhang(2019)}}?><label>Teshome and Zhang(2019)</label><?label Teshome2019?><mixed-citation>Teshome, A. and Zhang, J.: Increase of Extreme Drought over Ethiopia under Climate Warming, Adv. Meteorol., 2019, 1–18, <ext-link xlink:href="https://doi.org/10.1155/2019/5235429" ext-link-type="DOI">10.1155/2019/5235429</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx59"><?xmltex \def\ref@label{{Thorarinsdottir et~al.(2013)Thorarinsdottir, Gneiting, and Gissibl}}?><label>Thorarinsdottir et al.(2013)Thorarinsdottir, Gneiting, and Gissibl</label><?label Thorarinsdottir2013?><mixed-citation>Thorarinsdottir, T. L., Gneiting, T., and Gissibl, N.: Using Proper Divergence Functions to Evaluate Climate Models, SIAM/ASA Journal on Uncertainty Quantification, 1, 522–534, <ext-link xlink:href="https://doi.org/10.1137/130907550" ext-link-type="DOI">10.1137/130907550</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx60"><?xmltex \def\ref@label{{Urtizberea et~al.(2013)Urtizberea, Dupont, Rosland, and Aksnes}}?><label>Urtizberea et al.(2013)Urtizberea, Dupont, Rosland, and Aksnes</label><?label Urtizberea2013?><mixed-citation>Urtizberea, A., Dupont, N., Rosland, R., and Aksnes, D. L.: Sensitivity of euphotic zone properties to CDOM variations in marine ecosystem models, Ecol. Model., 256, 16–22, <ext-link xlink:href="https://doi.org/10.1016/j.ecolmodel.2013.02.010" ext-link-type="DOI">10.1016/j.ecolmodel.2013.02.010</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx61"><?xmltex \def\ref@label{{Van Rossum(2020)}}?><label>Van Rossum(2020)</label><?label PythonMath?><mixed-citation> Van Rossum, G.: The Python Library Reference, release 3.8.2, Python Software Foundation, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx62"><?xmltex \def\ref@label{{Versteegh et~al.(2022)Versteegh, Zonneveld, Hefter, Romero, Fischer, and Mollenhauer}}?><label>Versteegh et al.(2022)Versteegh, Zonneveld, Hefter, Romero, Fischer, and Mollenhauer</label><?label Versteegh_etal2022?><mixed-citation>Versteegh, G. J. M., Zonneveld, K. A. F., Hefter, J., Romero, O. E., Fischer, G., and Mollenhauer, G.: Performance of temperature and productivity proxies based on long-chain alkane-1, mid-chain diols at test: a 5-year sediment trap record from the Mauritanian upwelling, Biogeosciences, 19, 1587–1610, <ext-link xlink:href="https://doi.org/10.5194/bg-19-1587-2022" ext-link-type="DOI">10.5194/bg-19-1587-2022</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx63"><?xmltex \def\ref@label{{Verwega et~al.(2021a)Verwega, Somes, Schartau, Tuerena, Lorrain, Oschlies, and Slawig}}?><label>Verwega et al.(2021a)Verwega, Somes, Schartau, Tuerena, Lorrain, Oschlies, and Slawig</label><?label verwegaPaper?><mixed-citation>Verwega, M.-T., Somes, C. J., Schartau, M., Tuerena, R. E., Lorrain, A., Oschlies, A., and Slawig, T.: Description of a global marine particulate organic carbon-13 isotope data set, Earth Syst. Sci. Data, 13, 4861–4880, <ext-link xlink:href="https://doi.org/10.5194/essd-13-4861-2021" ext-link-type="DOI">10.5194/essd-13-4861-2021</ext-link>, 2021a.</mixed-citation></ref>
      <ref id="bib1.bibx64"><?xmltex \def\ref@label{{{Verwega} et~al.(2021b){Verwega}, {Somes}, {Tuerena}, and {Lorrain}}}?><label>Verwega et al.(2021b)Verwega, Somes, Tuerena, and Lorrain</label><?label verwega?><mixed-citation>Verwega, M.-T., Somes, C. J., Tuerena, R. E., and Lorrain, A.: A global marine particulate organic carbon-13 isotope data product, PANGAEA [data set], <ext-link xlink:href="https://doi.org/10.1594/PANGAEA.929931" ext-link-type="DOI">10.1594/PANGAEA.929931</ext-link>, 2021b.</mixed-citation></ref>
      <ref id="bib1.bibx65"><?xmltex \def\ref@label{{Virtanen et~al.(2020)Virtanen, Gommers, Oliphant, Haberland, Reddy, Cournapeau, Burovski, Peterson, Weckesser, Bright, {van der Walt}, Brett, Wilson, Millman, Mayorov, Nelson, Jones, Kern, Larson, Carey, Polat, Feng, Moore, {VanderPlas}, Laxalde, Perktold, Cimrman, Henriksen, Quintero, Harris, Archibald, Ribeiro, Pedregosa, {van Mulbregt}, and {SciPy 1.0 Contributors}}}?><label>Virtanen et al.(2020)Virtanen, Gommers, Oliphant, Haberland, Reddy, Cournapeau, Burovski, Peterson, Weckesser, Bright, van der Walt, Brett, Wilson, Millman, Mayorov, Nelson, Jones, Kern, Larson, Carey, Polat, Feng, Moore, VanderPlas, Laxalde, Perktold, Cimrman, Henriksen, Quintero, Harris, Archibald, Ribeiro, Pedregosa, van Mulbregt, and SciPy 1.0 Contributors</label><?label SciPyarticle?><mixed-citation>Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E., Kern, R., Larson, E., Carey, C. J., Polat, İ., Feng, Y., Moore, E. W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E. A., Harris, C. R., Archibald, A. M., Ribeiro, A. H., Pedregosa, F., van Mulbregt, P., and SciPy 1.0 Contributors: SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python, Nat. Methods, 17, 261–272, <ext-link xlink:href="https://doi.org/10.1038/s41592-019-0686-2" ext-link-type="DOI">10.1038/s41592-019-0686-2</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx66"><?xmltex \def\ref@label{{Xu et~al.(2015)Xu, Yan, and Xu}}?><label>Xu et al.(2015)Xu, Yan, and Xu</label><?label xu2015?><mixed-citation> Xu, X., Yan, Z., and Xu, S.: Estimating wind speed probability distribution by diffusion-based kernel density method, Elect. Pow. Syst. Res., 121, 28–37, 2015.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>A diffusion-based kernel density estimator (diffKDE, version 1) with optimal bandwidth approximation for the analysis of data in geoscience and ecological research</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Abramson(1982)</label><mixed-citation>
      
Abramson, I. S.:
On bandwidth variation in kernel estimates-a square root law, Ann. Stat., pp. 1217–1223, <a href="https://doi.org/10.1214/aos/1176345986" target="_blank">https://doi.org/10.1214/aos/1176345986</a>, 1982.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Berlinet(1993)</label><mixed-citation>
      
Berlinet, A.:
Hierarchies of higher order kernels, Prob. Theory Rel., 94, 489–504, <a href="https://doi.org/10.1007/bf01192560" target="_blank">https://doi.org/10.1007/bf01192560</a>, 1993.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Bernacchia and Pigolotti(2011)</label><mixed-citation>
      
Bernacchia, A. and Pigolotti, S.:
Self-Consistent Method for Density Estimation, J. R. Stat. Soc. B, 73, 407–422, <a href="https://doi.org/10.1111/j.1467-9868.2011.00772.x" target="_blank">https://doi.org/10.1111/j.1467-9868.2011.00772.x</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Boccara(1990)</label><mixed-citation>
      
Boccara, N.:
Functional Analysis – An Introduction for Physicists, Academic Press, Inc., ISBN 0121088103, 1990.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Botev et al.(2010)Botev, Grotowski, and Kroese</label><mixed-citation>
      
Botev, Z. I., Grotowski, J. F., and Kroese, D. P.:
Kernel density estimation via diffusion, Ann. Stat., 38, 2916–2957, <a href="https://doi.org/10.1214/10-AOS799" target="_blank">https://doi.org/10.1214/10-AOS799</a>, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Breiman et al.(1977)Breiman, Meisel, and Purcell</label><mixed-citation>
      
Breiman, L., Meisel, W., and Purcell, E.:
Variable kernel estimates of multivariate densities, Technometrics, 19, 135–144, 1977.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Chacón and Duong(2018)</label><mixed-citation>
      
Chacón, J. E. and Duong, T.:
Multivariate kernel smoothing and its applications, CRC Press, ISBN 1498763014, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Chaudhuri and Marron(2000)</label><mixed-citation>
      
Chaudhuri, P. and Marron, J.:
Scale space view of curve estimation, Ann. Stat., 28, 408–428, <a href="https://doi.org/10.1214/aos/1016218224" target="_blank">https://doi.org/10.1214/aos/1016218224</a>, 2000.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Chung et al.(2018)Chung, Khaki, Chu, and Gadh</label><mixed-citation>
      
Chung, Y.-W., Khaki, B., Chu, C., and Gadh, R.:
Electric Vehicle User Behavior Prediction Using Hybrid Kernel Density Estimator, in: 2018 IEEE International Conference on Probabilistic Methods Applied to Power Systems (PMAPS), Boise, Idaho, USA, 24–28 June 2018,  1–6, <a href="https://doi.org/10.1109/PMAPS.2018.8440360" target="_blank">https://doi.org/10.1109/PMAPS.2018.8440360</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Davies and Baddeley(2017)</label><mixed-citation>
      
Davies, T. M. and Baddeley, A.:
Fast computation of spatially adaptive kernel estimates, Stat. Comput., 28, 937–956, <a href="https://doi.org/10.1007/s11222-017-9772-4" target="_blank">https://doi.org/10.1007/s11222-017-9772-4</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Dekking et al.(2005)Dekking, Kraaikamp, Lopuhaä, and Meester</label><mixed-citation>
      
Dekking, F. M., Kraaikamp, C., Lopuhaä, H. P., and Meester, L. E.:
A Modern Introduction to Probability and Statistics, Springer London, <a href="https://doi.org/10.1007/1-84628-168-7" target="_blank">https://doi.org/10.1007/1-84628-168-7</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Deniz et al.(2011)Deniz, Cardanobile, and Rotter</label><mixed-citation>
      
Deniz, T., Cardanobile, S., and Rotter, S.:
A PYTHON Package for Kernel Smoothing via Diffusion: Estimation of Spike Train Firing Rate, Front. Comput. Neurosci. Conference Abstract: BC11 : Computational Neuroscience &amp; Neurotechnology Bernstein Conference &amp; Neurex Annual Meeting 2011, Bernstein Center, Freiburg, Germany, 4–6 October 2011, 5, <a href="https://doi.org/10.3389/conf.fncom.2011.53.00071" target="_blank">https://doi.org/10.3389/conf.fncom.2011.53.00071</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Dessai et al.(2005)Dessai, Lu, and Hulme</label><mixed-citation>
      
Dessai, S., Lu, X., and Hulme, M.:
Limited sensitivity analysis of regional climate change probabilities for the 21st century, J. Geophys. Res.-Atmos., 110,  D19108, <a href="https://doi.org/10.1029/2005JD005919" target="_blank">https://doi.org/10.1029/2005JD005919</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Dirac(1927)</label><mixed-citation>
      
Dirac, P. A. M.:
The physical interpretation of the quantum dynamics, P. R. Soc. A-Conta., 113, 621–641, <a href="https://doi.org/10.1098/rspa.1927.0012" target="_blank">https://doi.org/10.1098/rspa.1927.0012</a>, 1927.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Farmer and Jacobs(2022)</label><mixed-citation>
      
Farmer, J. and Jacobs, D. J.:
MATLAB tool for probability density assessment and nonparametric estimation, SoftwareX, 18, 101017, <a href="https://doi.org/10.1016/j.softx.2022.101017" target="_blank">https://doi.org/10.1016/j.softx.2022.101017</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Gommers et al.(2022)Gommers, Virtanen, Burovski, Weckesser, Oliphant, Cournapeau, Haberland, Reddy, alexbrc, Peterson, Nelson, Wilson, endolith, Mayorov, Polat, van der Walt, Laxalde, Brett, Larson, Millman, Lars, peterbell10, Roy, van Mulbregt, Carey, eric jones, Sakai, Moore, Kai, and Kern</label><mixed-citation>
      
Gommers, R., Virtanen, P., Burovski, E., Weckesser, W., Oliphant, T. E., Cournapeau, D., Haberland, M., Reddy, T., alexbrc, Peterson, P., Nelson, A., Wilson, J., endolith, Mayorov, N., Polat, I., van der Walt, S., Laxalde, D., Brett, M., Larson, E., Millman, J., Lars, peterbell10, Roy, P., van Mulbregt, P., Carey, C., eric jones, Sakai, A., Moore, E., Kai, and Kern, R.:
scipy/scipy: SciPy 1.8.0, Zenodo, <a href="https://doi.org/10.5281/zenodo.5979747" target="_blank">https://doi.org/10.5281/zenodo.5979747</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Gramacki(2018)</label><mixed-citation>
      
Gramacki, A.:
Nonparametric Kernel Density Estimation and Its Computational Aspects, Springer International Publishing, <a href="https://doi.org/10.1007/978-3-319-71688-6" target="_blank">https://doi.org/10.1007/978-3-319-71688-6</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Harris et al.(2020)Harris, Millman, van der Walt, Gommers, Virtanen, Cournapeau, Wieser, Taylor, Berg, Smith, Kern, Picus, Hoyer, van Kerkwijk, Brett, Haldane, del Río, Wiebe, Peterson, Gérard-Marchant, Sheppard, Reddy, Weckesser, Abbasi, Gohlke, and Oliphant</label><mixed-citation>
      
Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M. H., Brett, M., Haldane, A., del Río, J. F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.:
Array programming with NumPy, Nature, 585, 357–362, <a href="https://doi.org/10.1038/s41586-020-2649-2" target="_blank">https://doi.org/10.1038/s41586-020-2649-2</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Heidenreich et al.(2013)Heidenreich, Schindler, and Sperlich</label><mixed-citation>
      
Heidenreich, N.-B., Schindler, A., and Sperlich, S.:
Bandwidth selection for kernel density estimation: a review of fully automatic selectors, AStA-Adv. Stat. Anal., 97, 403–433, <a href="https://doi.org/10.1007/s10182-013-0216-y" target="_blank">https://doi.org/10.1007/s10182-013-0216-y</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Hennig(2021)</label><mixed-citation>
      
Hennig, J.:
John-Hennig/KDE-diffusion: KDE-diffusion 1.0.3, Zenodo [code], <a href="https://doi.org/10.5281/zenodo.4663430" target="_blank">https://doi.org/10.5281/zenodo.4663430</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Hirsch and Lacombe(1999)</label><mixed-citation>
      
Hirsch, F. and Lacombe, G.:
Elements of Functional Analysis, Springer, ISBN 9781461271468, 1999.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Hunter(2007)</label><mixed-citation>
      
Hunter, J. D.:
Matplotlib: A 2D graphics environment, Comput. Sci. Eng., 9, 90–95, <a href="https://doi.org/10.1109/mcse.2007.55" target="_blank">https://doi.org/10.1109/mcse.2007.55</a>, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Jones et al.(1996)Jones, Marron, and Sheather</label><mixed-citation>
      
Jones, M. C., Marron, J. S., and Sheather, S. J.:
A Brief Survey of Bandwidth Selection for Density Estimation, J. Am. Stat. Assoc., 91, 401–407, <a href="https://doi.org/10.1080/01621459.1996.10476701" target="_blank">https://doi.org/10.1080/01621459.1996.10476701</a>, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Khorramdel et al.(2018)Khorramdel, Chung, Safari, and Price</label><mixed-citation>
      
Khorramdel, B., Chung, C. Y., Safari, N., and Price, G. C. D.:
A Fuzzy Adaptive Probabilistic Wind Power Prediction Framework Using Diffusion Kernel Density Estimators, IEEE T. Power Syst., 33, 7109–7121, <a href="https://doi.org/10.1109/tpwrs.2018.2848207" target="_blank">https://doi.org/10.1109/tpwrs.2018.2848207</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Kirk(2011)</label><mixed-citation>
      
Kirk, J. T. O.:
Light and Photosynthesis in Aquatic Ecosystems, third edn., Cambridge Univ. Press, ISBN 9780521151757, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Lampe et al.(2021)Lampe, Nöthig, and Schartau</label><mixed-citation>
      
Lampe, V., Nöthig, E.-M., and Schartau, M.:
Spatio-Temporal Variations in Community Size Structure of Arctic Protist Plankton in the Fram Strait, Front. in Mar. Sci., 7, 579880, <a href="https://doi.org/10.3389/fmars.2020.579880" target="_blank">https://doi.org/10.3389/fmars.2020.579880</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Li et al.(2019)Li, Lu, Bian, Qin, and Wu</label><mixed-citation>
      
Li, G., Lu, W., Bian, J., Qin, F., and Wu, J.:
Probabilistic Optimal Power Flow Calculation Method Based on Adaptive Diffusion Kernel Density Estimation, Frontiers in Energy Research, 7, 128, <a href="https://doi.org/10.3389/fenrg.2019.00128" target="_blank">https://doi.org/10.3389/fenrg.2019.00128</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Ma et al.(2019)Ma, Sun, Wang, and Wang</label><mixed-citation>
      
Ma, S., Sun, S., Wang, B., and Wang, N.:
Estimating load spectra probability distributions of train bogie frames by the diffusion-based kernel density method, International Journal of Fatigue, 132, 105352, <a href="https://doi.org/10.1016/j.ijfatigue.2019.105352" target="_blank">https://doi.org/10.1016/j.ijfatigue.2019.105352</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Majdara and Nooshabadi(2020)</label><mixed-citation>
      
Majdara, A. and Nooshabadi, S.:
Nonparametric Density Estimation Using Copula Transform, Bayesian Sequential Partitioning, and Diffusion-Based Kernel Estimator, IEEE T. Knowl. Data En., 32, 821–826, <a href="https://doi.org/10.1109/tkde.2019.2930052" target="_blank">https://doi.org/10.1109/tkde.2019.2930052</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Marron and Ruppert(1994)</label><mixed-citation>
      
Marron, J. S. and Ruppert, D.:
Transformations to reduce boundary bias in kernel density estimation, J. Roy. Stat. Soc. B-Met., 56, 653–671, <a href="https://www.jstor.org/stable/2346189" target="_blank"/> (last access: 15 December 2022), 1994.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>McSwiggan et al.(2016)McSwiggan, Baddeley, and Nair</label><mixed-citation>
      
McSwiggan, G., Baddeley, A., and Nair, G.:
Kernel Density Estimation on a Linear Network, Scand. J. Stat., 44, 324–345, <a href="https://doi.org/10.1111/sjos.12255" target="_blank">https://doi.org/10.1111/sjos.12255</a>, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Nöthig et al.(2015)Nöthig, Bracher, Engel, Metfies, Niehoff, Peeken, Bauerfeind, Cherkasheva, Gäbler-Schwarz, Hardge, Kilias, Kraft, Mebrahtom Kidane, Lalande, Piontek, Thomisch, and Wurst</label><mixed-citation>
      
Nöthig, E.-M., Bracher, A., Engel, A., Metfies, K., Niehoff, B., Peeken, I., Bauerfeind, E., Cherkasheva, A., Gäbler-Schwarz, S., Hardge, K., Kilias, E., Kraft, A., Mebrahtom Kidane, Y., Lalande, C., Piontek, J., Thomisch, K., and Wurst, M.:
Summertime plankton ecology in Fram Strait – a compilation of long- and short-term observations, Polar Res., 34, 23349, <a href="https://doi.org/10.3402/polar.v34.23349" target="_blank">https://doi.org/10.3402/polar.v34.23349</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>O'Brien et al.(2019)O'Brien, O'Brien, Patricola, and Wang</label><mixed-citation>
      
O'Brien, J. P., O'Brien, T. A., Patricola, C. M., and Wang, S.-Y. S.:
Metrics for understanding large-scale controls of multivariate temperature and precipitation variability, Clim. Dynam., 53, 3805–3823, <a href="https://doi.org/10.1007/s00382-019-04749-6" target="_blank">https://doi.org/10.1007/s00382-019-04749-6</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Oliver et al.(2022)Oliver, Cartis, Kriest, Tett, and Khatiwala</label><mixed-citation>
      
Oliver, S., Cartis, C., Kriest, I., Tett, S. F. B., and Khatiwala, S.:
A derivative-free optimisation method for global ocean biogeochemical models, Geosci. Model Dev., 15, 3537–3554, <a href="https://doi.org/10.5194/gmd-15-3537-2022" target="_blank">https://doi.org/10.5194/gmd-15-3537-2022</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Ongoma et al.(2017)Ongoma, Chen, Gao, and Sagero</label><mixed-citation>
      
Ongoma, V., Chen, H., Gao, C., and Sagero, P. O.:
Variability of temperature properties over Kenya based on observed and reanalyzed datasets, Theor. Appl. Climatol., 133, 1175–1190, <a href="https://doi.org/10.1007/s00704-017-2246-y" target="_blank">https://doi.org/10.1007/s00704-017-2246-y</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Palmer(2012)</label><mixed-citation>
      
Palmer, T. N.:
Towards the probabilistic Earth-system simulator: a vision for the future of climate and weather prediction, Q. J. Roy. Meteor. Soc., 138, 841–861, <a href="https://doi.org/10.1002/qj.1923" target="_blank">https://doi.org/10.1002/qj.1923</a>, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Panaretos and Zemel(2019)</label><mixed-citation>
      
Panaretos, V. M. and Zemel, Y.:
Statistical Aspects of Wasserstein Distances, Annu. Rev. Stat. Appl., 6, 405–431, <a href="https://doi.org/10.1146/annurev-statistics-030718-104938" target="_blank">https://doi.org/10.1146/annurev-statistics-030718-104938</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Parzen(1962)</label><mixed-citation>
      
Parzen, E.:
On estimation of a probability density function and mode, Ann Math. Stat., 33, 1065–1076, 1962.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Pedregosa et al.(2012)Pedregosa, Varoquaux, Gramfort, Michel, Thirion, Grisel, Blondel, Müller, Nothman, Louppe, Prettenhofer, Weiss, Dubourg, Vanderplas, Passos, Cournapeau, Brucher, Perrot, and Duchesnay</label><mixed-citation>
      
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Müller, A., Nothman, J., Louppe, G., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, E.:
Scikit-learn: Machine Learning in Python, Cornell Unversity, <a href="https://doi.org/10.48550/ARXIV.1201.0490" target="_blank">https://doi.org/10.48550/ARXIV.1201.0490</a>, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Pedretti and Fernàndez-Garcia(2013)</label><mixed-citation>
      
Pedretti, D. and Fernàndez-Garcia, D.:
An automatic locally-adaptive method to estimate heavily-tailed breakthrough curves from particle distributions, Adv. Water Resour., 59, 52–65, <a href="https://doi.org/10.1016/j.advwatres.2013.05.006" target="_blank">https://doi.org/10.1016/j.advwatres.2013.05.006</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Pelz and Slawig(2023)</label><mixed-citation>
      
Pelz, M.-T. and Slawig, T.:
Diffusion-based kernel density estimator (diffKDE), Zenodo [code], <a href="https://doi.org/10.5281/ZENODO.7594915" target="_blank">https://doi.org/10.5281/ZENODO.7594915</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Perkins et al.(2007)Perkins, Pitman, and McAneney</label><mixed-citation>
      
Perkins, S. E., Pitman, A. J., and McAneney, N. J. H. J.:
Evaluation of the AR4 Climate Models' Simulated Daily Maximum Temperature, Minimum Temperature, and Precipitation over Australia Using Probability Density Functions, J. Climate, 20, 4356–4376, <a href="https://doi.org/10.1175/JCLI4253.1" target="_blank">https://doi.org/10.1175/JCLI4253.1</a>, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Qin and Xiao(2018)</label><mixed-citation>
      
Qin, B. and Xiao, F.:
A Non-Parametric Method to Determine Basic Probability Assignment Based on Kernel Density Estimation, IEEE Access, 6, 73509–73519, <a href="https://doi.org/10.1109/ACCESS.2018.2883513" target="_blank">https://doi.org/10.1109/ACCESS.2018.2883513</a>, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Quintana et al.(2008)Quintana, Brucet, Boix, López-Flores, Gascón, Badosa, Sala, Moreno-Amich, and Egozcue</label><mixed-citation>
      
Quintana, X. D., Brucet, S., Boix, D., López-Flores, R., Gascón, S., Badosa, A., Sala, J., Moreno-Amich, R., and Egozcue, J. J.:
A nonparametric method for the measurement of size diversity with emphasis on data standardization, Limnol. Oceanogr.-Meth., 6, 75–86, <a href="https://doi.org/10.4319/lom.2008.6.75" target="_blank">https://doi.org/10.4319/lom.2008.6.75</a>, 2008.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Romero et al.(2020)Romero, Baumann, Zonneveld, Donner, Hefter, Hamady, Pospelova, and Fischer</label><mixed-citation>
      
Romero, O. E., Baumann, K.-H., Zonneveld, K. A. F., Donner, B., Hefter, J., Hamady, B., Pospelova, V., and Fischer, G.:
Flux variability of phyto- and zooplankton communities in the Mauritanian coastal upwelling between 2003 and 2008, Biogeosciences, 17, 187–214, <a href="https://doi.org/10.5194/bg-17-187-2020" target="_blank">https://doi.org/10.5194/bg-17-187-2020</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Santhosh and Srinivas(2013)</label><mixed-citation>
      
Santhosh, D. and Srinivas, V. V.:
Bivariate frequency analysis of floods using a diffusion based kernel density estimator, Water Resour. Res., 49, 8328–8343, <a href="https://doi.org/10.1002/2011wr010777" target="_blank">https://doi.org/10.1002/2011wr010777</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Sathyendranath et al.(2019)Sathyendranath, Brewin, Brockmann, Brotas, Calton, Chuprin, Cipollini, Couto, Dingle, Doerffer, Donlon, Dowell, Farman, Grant, Groom, Horseman, Jackson, Krasemann, Lavender, Martinez-Vicente, Mazeran, Mélin, Moore, Müller, Regner, Roy, Steele, Steinmetz, Swinton, Taberner, Thompson, Valente, Zühlke, Brando, Feng, Feldman, Franz, Frouin, Gould, Hooker, Kahru, Kratzer, Mitchell, Muller-Karger, Sosik, Voss, Werdell, and Platt</label><mixed-citation>
      
Sathyendranath, S., Brewin, R. J., Brockmann, C., Brotas, V., Calton, B., Chuprin, A., Cipollini, P., Couto, A. B., Dingle, J., Doerffer, R., Donlon, C., Dowell, M., Farman, A., Grant, M., Groom, S., Horseman, A., Jackson, T., Krasemann, H., Lavender, S., Martinez-Vicente, V., Mazeran, C., Mélin, F., Moore, T. S., Müller, D., Regner, P., Roy, S., Steele, C. J., Steinmetz, F., Swinton, J., Taberner, M., Thompson, A., Valente, A., Zühlke, M., Brando, V. E., Feng, H., Feldman, G., Franz, B. A., Frouin, R., Gould, R. W., Hooker, S. B., Kahru, M., Kratzer, S., Mitchell, B. G., Muller-Karger, F. E., Sosik, H. M., Voss, K. J., Werdell, J., and Platt, T.:
An Ocean-Colour Time Series for Use in Climate Studies: The Experience of the Ocean-Colour Climate Change Initiative (OC-CCI), Sensors, 19, 4285, <a href="https://doi.org/10.3390/s19194285" target="_blank">https://doi.org/10.3390/s19194285</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Sathyendranath et al.(2021)Sathyendranath, Jackson, Brockmann, Brotas, Calton, Chuprin, Clements, Cipollini, Danne, Dingle, Donlon, Grant, Groom, Krasemann, Lavender, Mazeran, Melin, Müller, Steinmetz, Valente, Zühlke, Feldman, Franz, Frouin, Werdell, and Platt</label><mixed-citation>
      
Sathyendranath, S., Jackson, T., Brockmann, C., Brotas, V., Calton, B., Chuprin, A., Clements, O., Cipollini, P., Danne, O., Dingle, J., Donlon, C., Grant, M., Groom, S., Krasemann, H., Lavender, S., Mazeran, C., Melin, F., Müller, D., Steinmetz, F., Valente, A., Zühlke, M., Feldman, G., Franz, B., Frouin, R., Werdell, J., and Platt, T.:
Global chlorophyll-a data products gridded on a geographic projection, Version 5.0, NERC EDS Centre for Environmental Data Analysis [data set], <a href="https://doi.org/10.5285/1dbe7a109c0244aaad713e078fd3059a" target="_blank">https://doi.org/10.5285/1dbe7a109c0244aaad713e078fd3059a</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Schartau et al.(2010)Schartau, Landry, and Armstrong</label><mixed-citation>
      
Schartau, M., Landry, M. R., and Armstrong, R. A.:
Density estimation of plankton size spectra: a reanalysis of IronEx II data, J. Plankton Res., 32, 1167–1184, <a href="https://doi.org/10.1093/plankt/fbq072" target="_blank">https://doi.org/10.1093/plankt/fbq072</a>, iSBN: 0142-7873, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Schmittner and Somes(2016)</label><mixed-citation>
      
Schmittner, A. and Somes, C. J.:
Complementary constraints from carbon (<sup>13</sup>C) and nitrogen (<sup>15</sup>N) isotopes on the glacial ocean's soft-tissue biological pump, Paleoceanography, 31, 669–693, <a href="https://doi.org/10.1002/2015PA002905" target="_blank">https://doi.org/10.1002/2015PA002905</a>, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Scott(1992)</label><mixed-citation>
      
Scott, D. W.:
Multivariate density estimation: theory, practice, and visualization, John Wiley &amp; Sons, <a href="https://doi.org/10.1002/9780470316849" target="_blank">https://doi.org/10.1002/9780470316849</a>, 1992.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Scott(2012)</label><mixed-citation>
      
Scott, D. W.:
Multivariate density estimation and visualization, in: Handbook of computational statistics, Springer,  549–569, <a href="https://doi.org/10.1007/978-3-642-21551-3_19" target="_blank">https://doi.org/10.1007/978-3-642-21551-3_19</a>,  2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Sheather(2004)</label><mixed-citation>
      
Sheather, S. J.:
Density Estimation, Stat. Sci., 19, 588–597, <a href="https://doi.org/10.1214/088342304000000297" target="_blank">https://doi.org/10.1214/088342304000000297</a>, 2004.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Sheather and Jones(1991)</label><mixed-citation>
      
Sheather, S. J. and Jones, M. C.:
A reliable data-based bandwidth selection method for kernel density estimation, J. Roy. Stat. Soc. B-Meth., 53, 683–690, 1991.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Silverman(1986)</label><mixed-citation>
      
Silverman, B.:
Density estimation, Monographs on Statistics and Applied Probability, Springer, ISBN 9780412246203, 1986.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>Sylla et al.(2019)Sylla, Mignot, Capet, and Gaye</label><mixed-citation>
      
Sylla, A., Mignot, J., Capet, X., and Gaye, A. T.:
Weakening of the Senegalo–Mauritanian upwelling system under climate change, Clim. Dynam., 53, 4447–4473, <a href="https://doi.org/10.1007/s00382-019-04797-y" target="_blank">https://doi.org/10.1007/s00382-019-04797-y</a>, 2019.


    </mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>Terrell and Scott(1992)</label><mixed-citation>
      
Terrell, G. R. and Scott, D. W.:
Variable kernel density estimation, Ann. Stat., 20, 1236–1265, <a href="https://www.jstor.org/stable/2242011" target="_blank"/> (last access: 15 December 2022), 1992.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib58"><label>Teshome and Zhang(2019)</label><mixed-citation>
      
Teshome, A. and Zhang, J.:
Increase of Extreme Drought over Ethiopia under Climate Warming, Adv. Meteorol., 2019, 1–18, <a href="https://doi.org/10.1155/2019/5235429" target="_blank">https://doi.org/10.1155/2019/5235429</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib59"><label>Thorarinsdottir et al.(2013)Thorarinsdottir, Gneiting, and Gissibl</label><mixed-citation>
      
Thorarinsdottir, T. L., Gneiting, T., and Gissibl, N.:
Using Proper Divergence Functions to Evaluate Climate Models, SIAM/ASA Journal on Uncertainty Quantification, 1, 522–534, <a href="https://doi.org/10.1137/130907550" target="_blank">https://doi.org/10.1137/130907550</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib60"><label>Urtizberea et al.(2013)Urtizberea, Dupont, Rosland, and Aksnes</label><mixed-citation>
      
Urtizberea, A., Dupont, N., Rosland, R., and Aksnes, D. L.:
Sensitivity of euphotic zone properties to CDOM variations in marine ecosystem models, Ecol. Model., 256, 16–22, <a href="https://doi.org/10.1016/j.ecolmodel.2013.02.010" target="_blank">https://doi.org/10.1016/j.ecolmodel.2013.02.010</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib61"><label>Van Rossum(2020)</label><mixed-citation>
      
Van Rossum, G.:
The Python Library Reference, release 3.8.2, Python Software Foundation, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib62"><label>Versteegh et al.(2022)Versteegh, Zonneveld, Hefter, Romero, Fischer, and Mollenhauer</label><mixed-citation>
      
Versteegh, G. J. M., Zonneveld, K. A. F., Hefter, J., Romero, O. E., Fischer, G., and Mollenhauer, G.:
Performance of temperature and productivity proxies based on long-chain alkane-1, mid-chain diols at test: a 5-year sediment trap record from the Mauritanian upwelling, Biogeosciences, 19, 1587–1610, <a href="https://doi.org/10.5194/bg-19-1587-2022" target="_blank">https://doi.org/10.5194/bg-19-1587-2022</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib63"><label>Verwega et al.(2021a)Verwega, Somes, Schartau, Tuerena, Lorrain, Oschlies, and Slawig</label><mixed-citation>
      
Verwega, M.-T., Somes, C. J., Schartau, M., Tuerena, R. E., Lorrain, A., Oschlies, A., and Slawig, T.:
Description of a global marine particulate organic carbon-13 isotope data set, Earth Syst. Sci. Data, 13, 4861–4880, <a href="https://doi.org/10.5194/essd-13-4861-2021" target="_blank">https://doi.org/10.5194/essd-13-4861-2021</a>, 2021a.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib64"><label>Verwega et al.(2021b)Verwega, Somes, Tuerena, and Lorrain</label><mixed-citation>
      
Verwega, M.-T., Somes, C. J., Tuerena, R. E., and Lorrain, A.:
A global marine particulate organic carbon-13 isotope data product, PANGAEA [data set], <a href="https://doi.org/10.1594/PANGAEA.929931" target="_blank">https://doi.org/10.1594/PANGAEA.929931</a>, 2021b.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib65"><label>Virtanen et al.(2020)Virtanen, Gommers, Oliphant, Haberland, Reddy, Cournapeau, Burovski, Peterson, Weckesser, Bright, van der Walt, Brett, Wilson, Millman, Mayorov, Nelson, Jones, Kern, Larson, Carey, Polat, Feng, Moore, VanderPlas, Laxalde, Perktold, Cimrman, Henriksen, Quintero, Harris, Archibald, Ribeiro, Pedregosa, van Mulbregt, and SciPy 1.0 Contributors</label><mixed-citation>
      
Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E., Kern, R., Larson, E., Carey, C. J., Polat, İ., Feng, Y., Moore, E. W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E. A., Harris, C. R., Archibald, A. M., Ribeiro, A. H., Pedregosa, F., van Mulbregt, P., and SciPy 1.0 Contributors: SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python, Nat. Methods, 17, 261–272, <a href="https://doi.org/10.1038/s41592-019-0686-2" target="_blank">https://doi.org/10.1038/s41592-019-0686-2</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib66"><label>Xu et al.(2015)Xu, Yan, and Xu</label><mixed-citation>
      
Xu, X., Yan, Z., and Xu, S.:
Estimating wind speed probability distribution by diffusion-based kernel density method, Elect. Pow. Syst. Res., 121, 28–37, 2015.

    </mixed-citation></ref-html>--></article>
