<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I use MKL Version 2019.0.1 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138917#M26181</link>
    <description>&lt;P&gt;I use MKL Version 2019.0.1 Build 20180928.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2019 12:00:24 GMT</pubDate>
    <dc:creator>K__Mario</dc:creator>
    <dc:date>2019-08-27T12:00:24Z</dc:date>
    <item>
      <title>Cubic spline interpolation on 3 samples</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138912#M26176</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the data fitting functions of MKL for cubic spline interpolation (&lt;EM&gt;&lt;STRONG&gt;DF_PP_CUBIC&lt;/STRONG&gt;&lt;/EM&gt;,&lt;EM&gt;&lt;STRONG&gt; DF_PP_DEFAULT&lt;/STRONG&gt;&lt;/EM&gt;)&amp;nbsp;using a not-a-knot condition (&lt;EM&gt;&lt;STRONG&gt;DF_BC_NOT_A_KNOT&lt;/STRONG&gt;&lt;/EM&gt;). In theory at least 4 samples are needed to&amp;nbsp;perform&amp;nbsp;this kind of interpolation, which is the unique cubic&amp;nbsp;interpolation polynomial in this case.&lt;/P&gt;&lt;P&gt;My question is: What is the result of the MKL routine in case of 3 samples,&amp;nbsp;which can also be executed without error code? Is this undefined behavior?&lt;/P&gt;&lt;P&gt;The MATLAB routine &lt;EM&gt;interp1 &lt;/EM&gt;performs a simple quadratic polynomial interpolation for example. But this result differs from MKL's.&lt;/P&gt;&lt;P&gt;Thanks for clarification&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 07:31:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138912#M26176</guid>
      <dc:creator>K__Mario</dc:creator>
      <dc:date>2019-08-06T07:31:33Z</dc:date>
    </item>
    <item>
      <title>Hi Mario,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138913#M26177</link>
      <description>&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Hi Mario,&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;To construct a default cubic spline with not-a-knot boundary conditions, you need:&lt;BR /&gt;- array of N breakpoints&lt;BR /&gt;- array of N function values in the respective breakpoints&lt;BR /&gt;- array of N-2 2&lt;SUP&gt;nd&lt;/SUP&gt; derivatives in the internal breakpoints&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;In other words, this type of spline requires at least three {breakpoints, function values} and one 2&lt;SUP&gt;nd&lt;/SUP&gt; derivative.&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Please, let me know, if it answers your question&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Pavel.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 10:56:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138913#M26177</guid>
      <dc:creator>Pavel_D_Intel1</dc:creator>
      <dc:date>2019-08-07T10:56:12Z</dc:date>
    </item>
    <item>
      <title>Hi Pavel,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138914#M26178</link>
      <description>&lt;P&gt;Hi Pavel,&lt;/P&gt;&lt;P&gt;to be more explicit:&lt;/P&gt;&lt;P&gt;Let (x_i)_i be the N&amp;nbsp;breakpoints for i=0,...,N-1 and S_i the spline over the interval [x_i, x_{i+1}].&lt;/P&gt;&lt;P&gt;For N &amp;gt;= 4 and not-a-knot boundary condition there is no need for additional required data given by the user. There is no need for second derivatives.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For example&lt;/STRONG&gt;: In case of&amp;nbsp;N = 4 there are three splines S_0, S_1, and S_2 with each having 4 searched coefficients.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In sum there are 12 searched coefficients.&lt;/LI&gt;&lt;LI&gt;The interpolation condition S(x_i) = y_i leads to&amp;nbsp;4 equations.&lt;/LI&gt;&lt;LI&gt;The continuity condition leads to&amp;nbsp;2 equations.&lt;/LI&gt;&lt;LI&gt;The continuity condition of the first derivative leads to&amp;nbsp;2 equations.&lt;/LI&gt;&lt;LI&gt;The continuity condition of the second derivative leads to&amp;nbsp;2 equations.&lt;/LI&gt;&lt;LI&gt;The not-a-knot condition S_0'''(x_1) = S_1'''(x_1) and S_1'''(x_2) = S_2'''(x_2) leads to 2 equations.&lt;/LI&gt;&lt;LI&gt;In sum there are 12 equations which leads to a unique solution.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Of course, a given second derivative would help in case of N=3 since the two not-a-knot conditions degenerate to one. In fact the MKL routine computes for N=3 interpolated values which are plausible. But how&amp;nbsp;is MKL doing this since I haven't configured data to compensate the degenerated not-a-knot condition?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 12:34:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138914#M26178</guid>
      <dc:creator>K__Mario</dc:creator>
      <dc:date>2019-08-07T12:34:16Z</dc:date>
    </item>
    <item>
      <title>Hi Mario,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138915#M26179</link>
      <description>&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Hi Mario,&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Let me provide additional details.&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Default cubic spline is a piecewise polynomial spline of the fourth order. Coefficients of this spline are calculated using breakpoints, function values and 2&lt;SUP&gt;nd&lt;/SUP&gt; derivatives. That is, the default cubic spline supports only &lt;STRONG&gt;DF_IC_2ND_DER &lt;/STRONG&gt;internal conditions.&lt;BR /&gt;The list of boundary conditions supported by this spline is as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Not-a-knot&lt;/LI&gt;&lt;LI&gt;1&lt;SUP&gt;st&lt;/SUP&gt; left derivative + 1&lt;SUP&gt;st&lt;/SUP&gt; right derivative&lt;/LI&gt;&lt;LI&gt;1&lt;SUP&gt;st&lt;/SUP&gt; left derivative + 2&lt;SUP&gt;nd&lt;/SUP&gt; right derivative&lt;/LI&gt;&lt;LI&gt;2&lt;SUP&gt;nd&lt;/SUP&gt; left derivative + 1&lt;SUP&gt;st&lt;/SUP&gt; right derivative&lt;/LI&gt;&lt;LI&gt;2&lt;SUP&gt;nd&lt;/SUP&gt; left derivative + 2&lt;SUP&gt;nd&lt;/SUP&gt; right derivative&lt;/LI&gt;&lt;LI&gt;Periodic&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Intel MKL documentation does not provide additional level of details about this spline, and we will address it in the future releases.&lt;BR /&gt;Please have a look at the “dfscubicsplineint2der.c” example that demonstrates how to construct default cubic spline.&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;MATLAB’s documentation appears not to provide information about cubic spline’s type used underneath interp1 function.&lt;BR /&gt;We however assume that the natural cubic spline with not-a-knot boundary conditions might be a possible option here.&lt;BR /&gt;Intel MKL default cubic spline differs from the natural cubic spline, so you can expect different interpolation results.&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Can you check spline construction and interpolation results with Intel MKL natural cubic spline for your interpolation problem?&lt;BR /&gt;Alternatively, you can provide a code sample that demonstrates discussed problem and reference results that you expect in this example, so we will be able to analyze it on our side.&lt;/P&gt;&lt;P style="margin-left:0cm; margin-right:0cm"&gt;Best regards,&lt;BR /&gt;Pavel.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 13:36:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138915#M26179</guid>
      <dc:creator>Pavel_D_Intel1</dc:creator>
      <dc:date>2019-08-08T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Mario, Which version of MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138916#M26180</link>
      <description>&lt;P&gt;Mario, Which version of MKL do you use right now?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 06:46:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138916#M26180</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-08-09T06:46:19Z</dc:date>
    </item>
    <item>
      <title>I use MKL Version 2019.0.1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138917#M26181</link>
      <description>&lt;P&gt;I use MKL Version 2019.0.1 Build 20180928.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 12:00:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cubic-spline-interpolation-on-3-samples/m-p/1138917#M26181</guid>
      <dc:creator>K__Mario</dc:creator>
      <dc:date>2019-08-27T12:00:24Z</dc:date>
    </item>
  </channel>
</rss>

