<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>regression-js Compatibility on statili</title>
    <link>https://statili.com/docs/compat-regression/</link>
    <description>Recent content in regression-js Compatibility on statili</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://statili.com/docs/compat-regression/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Migrating from `regression`</title>
      <link>https://statili.com/docs/compat-regression/migration/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/compat-regression/migration/</guid>
      <description>&lt;!-- Generated by scripts/build-docs.mjs — do not edit; your changes will be overwritten. --&gt;&#xA;&lt;p&gt;&lt;code&gt;@statili/compat-regression&lt;/code&gt; is a drop-in replacement for &lt;a href=&#34;https://www.npmjs.com/package/regression&#34;&gt;&lt;code&gt;regression&lt;/code&gt;&lt;/a&gt; (regression-js), which has been unchanged since December 2017.&lt;/p&gt;&#xA;&lt;p&gt;Same five methods, same result shape, same equation strings. It fixes four defects in the original and adds a way to find out when a fit failed — something the original API has no room to express.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-change&#34;&gt;The change&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;- import regression from &amp;#34;regression&amp;#34;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gd&#34;&gt;&lt;/span&gt;&lt;span class=&#34;gi&#34;&gt;+ import regression from &amp;#34;@statili/compat-regression&amp;#34;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;npm install @statili/compat-regression&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing else changes. &lt;code&gt;linear&lt;/code&gt;, &lt;code&gt;exponential&lt;/code&gt;, &lt;code&gt;logarithmic&lt;/code&gt;, &lt;code&gt;power&lt;/code&gt;, &lt;code&gt;polynomial&lt;/code&gt; and &lt;code&gt;_round&lt;/code&gt; all keep their signatures, and &lt;code&gt;require()&lt;/code&gt; works as before.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Index</title>
      <link>https://statili.com/docs/compat-regression/api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/compat-regression/api/</guid>
      <description>&lt;!-- Generated by scripts/build-docs.mjs — do not edit; your changes will be overwritten. --&gt;&#xA;&lt;div class=&#34;api-module&#34;&gt;&#xA;  &lt;p class=&#34;pkg-meta&#34;&gt;&#xA;    &lt;code&gt;@statili/compat-regression&lt;/code&gt;&#xA;    &lt;span class=&#34;pkg-meta__sep&#34;&gt;·&lt;/span&gt;&lt;span&gt;v0.0.1-beta.0&lt;/span&gt;&#xA;    &lt;span class=&#34;pkg-meta__sep&#34;&gt;·&lt;/span&gt;&lt;span&gt;7 exports&lt;/span&gt;&#xA;  &lt;/p&gt;&#xA;  &lt;nav class=&#34;api-jump&#34; aria-label=&#34;Exports in this module&#34;&gt;&#xA;    &lt;a href=&#34;#-round&#34;&gt;_round&lt;/a&gt;&#xA;    &lt;a href=&#34;#exponential&#34;&gt;exponential&lt;/a&gt;&#xA;    &lt;a href=&#34;#linear&#34;&gt;linear&lt;/a&gt;&#xA;    &lt;a href=&#34;#logarithmic&#34;&gt;logarithmic&lt;/a&gt;&#xA;    &lt;a href=&#34;#polynomial&#34;&gt;polynomial&lt;/a&gt;&#xA;    &lt;a href=&#34;#power&#34;&gt;power&lt;/a&gt;&#xA;    &lt;a href=&#34;#default&#34;&gt;default&lt;/a&gt;&#xA;  &lt;/nav&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;-round&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#-round&#34; aria-label=&#34;Link to _round&#34;&gt;#&lt;/a&gt;&#xA;      _round&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L22&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:22&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;_round&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;precision&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Rounds to &lt;code&gt;precision&lt;/code&gt; decimal places.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;Exported because &lt;code&gt;regression&lt;/code&gt; exports it as &lt;code&gt;_round&lt;/code&gt;, and some callers reach&#xA;for it to format their own values consistently with the fit.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;&lt;span class=&#34;api-muted&#34;&gt;—&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;precision&lt;/td&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;&lt;span class=&#34;api-muted&#34;&gt;—&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;number&lt;/code&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;exponential&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#exponential&#34; aria-label=&#34;Link to exponential&#34;&gt;#&lt;/a&gt;&#xA;      exponential&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L122&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:122&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;exponential&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;DataPoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[],&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;options?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;Partial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Fits &lt;strong&gt;y = a·e^(bx)&lt;/strong&gt;. Returns coefficients as &lt;code&gt;[a, b]&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;Uses the same y-weighted least squares as &lt;code&gt;regression&lt;/code&gt;, which tracks the data&#xA;in its original units more closely than plain regression on ln(y).&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;data&lt;/td&gt;&#xA;        &lt;td&gt;DataPoint[]&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;[x, y]&lt;/code&gt; pairs. Requires y &amp;gt; 0.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;options&lt;span class=&#34;api-optional&#34;&gt;optional&lt;/span&gt;&lt;/td&gt;&#xA;        &lt;td&gt;Partial&amp;lt;Options&amp;gt; | undefined&lt;/td&gt;&#xA;        &lt;td&gt;&lt;span class=&#34;api-muted&#34;&gt;—&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;Result&lt;/code&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;linear&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#linear&#34; aria-label=&#34;Link to linear&#34;&gt;#&lt;/a&gt;&#xA;      linear&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L98&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:98&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;linear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;DataPoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[],&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;options?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;Partial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Fits a straight line, &lt;strong&gt;y = mx + c&lt;/strong&gt;. Returns coefficients as &lt;code&gt;[m, c]&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;data&lt;/td&gt;&#xA;        &lt;td&gt;DataPoint[]&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;[x, y]&lt;/code&gt; pairs. Rows with a &lt;code&gt;null&lt;/code&gt; y are skipped.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;options&lt;span class=&#34;api-optional&#34;&gt;optional&lt;/span&gt;&lt;/td&gt;&#xA;        &lt;td&gt;Partial&amp;lt;Options&amp;gt; | undefined&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;{ precision }&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;Result&lt;/code&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Example&lt;/h3&gt;&#xA;  &lt;figure class=&#34;api-example&#34;&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;linear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;67&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;79&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]]);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;equation&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// [gradient, intercept]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;predict&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/figure&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;logarithmic&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#logarithmic&#34; aria-label=&#34;Link to logarithmic&#34;&gt;#&lt;/a&gt;&#xA;      logarithmic&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L137&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:137&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;logarithmic&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;DataPoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[],&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;options?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;Partial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Fits &lt;strong&gt;y = a + b·ln(x)&lt;/strong&gt;. Returns coefficients as &lt;code&gt;[a, b]&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;data&lt;/td&gt;&#xA;        &lt;td&gt;DataPoint[]&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;[x, y]&lt;/code&gt; pairs. Requires x &amp;gt; 0.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;options&lt;span class=&#34;api-optional&#34;&gt;optional&lt;/span&gt;&lt;/td&gt;&#xA;        &lt;td&gt;Partial&amp;lt;Options&amp;gt; | undefined&lt;/td&gt;&#xA;        &lt;td&gt;&lt;span class=&#34;api-muted&#34;&gt;—&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;Result&lt;/code&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;polynomial&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#polynomial&#34; aria-label=&#34;Link to polynomial&#34;&gt;#&lt;/a&gt;&#xA;      polynomial&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L172&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:172&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;polynomial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;DataPoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[],&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;options?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;Partial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Fits a polynomial of the given &lt;code&gt;order&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;Returns coefficients &lt;strong&gt;highest power first&lt;/strong&gt; — &lt;code&gt;[aₙ, …, a₁, a₀]&lt;/code&gt; — matching&#xA;&lt;code&gt;regression&lt;/code&gt;. Note this is the reverse of &lt;code&gt;@statili/stats&lt;/code&gt;, which orders them&#xA;ascending.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;data&lt;/td&gt;&#xA;        &lt;td&gt;DataPoint[]&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;[x, y]&lt;/code&gt; pairs.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;options&lt;span class=&#34;api-optional&#34;&gt;optional&lt;/span&gt;&lt;/td&gt;&#xA;        &lt;td&gt;Partial&amp;lt;Options&amp;gt; | undefined&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;{ order, precision }&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;Result&lt;/code&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;power&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#power&#34; aria-label=&#34;Link to power&#34;&gt;#&lt;/a&gt;&#xA;      power&#xA;      &lt;span class=&#34;api-kind api-kind--function&#34;&gt;function&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L152&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:152&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;power&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;data&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;DataPoint&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[],&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;options?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;Partial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Options&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Fits &lt;strong&gt;y = a·x^b&lt;/strong&gt;. Returns coefficients as &lt;code&gt;[a, b]&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Parameters&lt;/h3&gt;&#xA;  &lt;table class=&#34;data-table api-params&#34;&gt;&#xA;    &lt;thead&gt;&#xA;      &lt;tr&gt;&lt;th scope=&#34;col&#34;&gt;Name&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Type&lt;/th&gt;&lt;th scope=&#34;col&#34;&gt;Description&lt;/th&gt;&lt;/tr&gt;&#xA;    &lt;/thead&gt;&#xA;    &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;data&lt;/td&gt;&#xA;        &lt;td&gt;DataPoint[]&lt;/td&gt;&#xA;        &lt;td&gt;&lt;code&gt;[x, y]&lt;/code&gt; pairs. Requires x &amp;gt; 0 and y &amp;gt; 0.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;options&lt;span class=&#34;api-optional&#34;&gt;optional&lt;/span&gt;&lt;/td&gt;&#xA;        &lt;td&gt;Partial&amp;lt;Options&amp;gt; | undefined&lt;/td&gt;&#xA;        &lt;td&gt;&lt;span class=&#34;api-muted&#34;&gt;—&lt;/span&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;    &lt;/tbody&gt;&#xA;  &lt;/table&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Returns&lt;/h3&gt;&lt;code class=&#34;api-returns__type&#34;&gt;Result&lt;/code&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;default&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#default&#34; aria-label=&#34;Link to default&#34;&gt;#&lt;/a&gt;&#xA;      default&#xA;      &lt;span class=&#34;api-kind api-kind--const&#34;&gt;const&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/index.ts#L209&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/index.ts:209&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;regression&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;linear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;exponential&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;logarithmic&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;power&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;polynomial&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;_round&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;The five fitting methods, matching the default export of &lt;code&gt;regression&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;h3 class=&#34;api-label&#34;&gt;Examples&lt;/h3&gt;&#xA;  &lt;figure class=&#34;api-example&#34;&gt;&lt;figcaption&gt;Before&lt;/figcaption&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;regression&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;regression&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// After — the only line that changes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;kr&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;regression&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;@statili/compat-regression&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;regression&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;linear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;32&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;67&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;79&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]]);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/figure&gt;&#xA;  &lt;figure class=&#34;api-example&#34;&gt;&lt;figcaption&gt;What the shim adds: a way to know the fit failed&lt;/figcaption&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;regression&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;linear&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]]);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;ok&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;warn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;error&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// `regression` answers this with a confident horizontal line and r2 = 0.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/figure&gt;&#xA;&lt;/section&gt;&#xA;&#xA;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Types</title>
      <link>https://statili.com/docs/compat-regression/types/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/compat-regression/types/</guid>
      <description>&lt;!-- Generated by scripts/build-docs.mjs — do not edit; your changes will be overwritten. --&gt;&#xA;&lt;div class=&#34;api-module&#34;&gt;&#xA;  &lt;p class=&#34;pkg-meta&#34;&gt;&#xA;    &lt;code&gt;@statili/compat-regression&lt;/code&gt;&#xA;    &lt;span class=&#34;pkg-meta__sep&#34;&gt;·&lt;/span&gt;&lt;span&gt;v0.0.1-beta.0&lt;/span&gt;&#xA;    &lt;span class=&#34;pkg-meta__sep&#34;&gt;·&lt;/span&gt;&lt;span&gt;4 exports&lt;/span&gt;&#xA;  &lt;/p&gt;&#xA;  &lt;nav class=&#34;api-jump&#34; aria-label=&#34;Exports in this module&#34;&gt;&#xA;    &lt;a href=&#34;#fiterror&#34;&gt;FitError&lt;/a&gt;&#xA;    &lt;a href=&#34;#options&#34;&gt;Options&lt;/a&gt;&#xA;    &lt;a href=&#34;#result&#34;&gt;Result&lt;/a&gt;&#xA;    &lt;a href=&#34;#datapoint&#34;&gt;DataPoint&lt;/a&gt;&#xA;  &lt;/nav&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;fiterror&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#fiterror&#34; aria-label=&#34;Link to FitError&#34;&gt;#&lt;/a&gt;&#xA;      FitError&#xA;      &lt;span class=&#34;api-kind api-kind--interface&#34;&gt;interface&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/types.ts#L15&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/types.ts:15&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;interface&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;FitError&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/**&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * Machine-readable cause.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   *&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `InsufficientData` — too few usable points for this model.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `DegenerateInput` — the x-values carry no variation to fit against.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `InvalidInput` — a non-finite value, or an out-of-domain point.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `MathError` — the fit produced non-finite coefficients.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `NumericalStability` — the normal equations were singular or ill-conditioned.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kr&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;InsufficientData&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;DegenerateInput&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;InvalidInput&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;MathError&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;NumericalStability&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** What went wrong, and what to do about it. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;Why a fit could not be produced.&lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;options&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#options&#34; aria-label=&#34;Link to Options&#34;&gt;#&lt;/a&gt;&#xA;      Options&#xA;      &lt;span class=&#34;api-kind api-kind--interface&#34;&gt;interface&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/types.ts#L5&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/types.ts:5&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;interface&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Options&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Polynomial degree. @default 2 */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;order&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Decimal places for rounding. @default 2 */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;precision&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Accepted and ignored, as in `regression`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;period&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;The five configuration keys &lt;code&gt;regression&lt;/code&gt; accepts.&lt;/div&gt;&#xA;&lt;/section&gt;&#xA;&lt;section class=&#34;api-symbol&#34; id=&#34;result&#34;&gt;&#xA;  &lt;div class=&#34;api-symbol__head&#34;&gt;&#xA;    &lt;h2 class=&#34;api-symbol__title&#34;&gt;&#xA;      &lt;a class=&#34;api-symbol__anchor&#34; href=&#34;#result&#34; aria-label=&#34;Link to Result&#34;&gt;#&lt;/a&gt;&#xA;      Result&#xA;      &lt;span class=&#34;api-kind api-kind--interface&#34;&gt;interface&lt;/span&gt;&#xA;    &lt;/h2&gt;&#xA;    &lt;a class=&#34;api-symbol__source&#34; href=&#34;https://github.com/ofhope/statili/blob/main/packages/compat-regression/src/types.ts#L47&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/compat-regression/src/types.ts:47&lt;/a&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;codeblock&#34;&gt;&#xA;    &lt;div class=&#34;codeblock__bar&#34;&gt;&#xA;      &lt;span class=&#34;codeblock__label&#34;&gt;signature&lt;/span&gt;&#xA;      &lt;button type=&#34;button&#34; class=&#34;copy-btn&#34;&gt;copy&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-typescript&#34; data-lang=&#34;typescript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;interface&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Result&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/**&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * Fitted coefficients.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   *&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `linear` — `[gradient, intercept]`&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `exponential` — `[a, b]` for y = ae^(bx)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `logarithmic` — `[a, b]` for y = a + b·ln(x)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `power` — `[a, b]` for y = ax^b&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * - `polynomial` — `[aₙ, …, a₁, a₀]`, highest power first&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   *&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * Filled with `NaN` when `ok` is `false`.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;equation&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[];&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Human-readable equation. Empty string when `ok` is `false`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/**&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * Predicted `[x, y]` at each input x.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   *&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * Empty when `ok` is `false`. The original returns points full of `NaN`&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   * instead, which charting libraries either throw on or render as garbage.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;points&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][];&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Coefficient of determination. `NaN` when `ok` is `false`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;r2&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Predicted `[x, y]` at any x. Returns `[x, NaN]` when `ok` is `false`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;predict&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** `false` when no fit could be produced. Not present in `regression`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;ok&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;boolean&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;cm&#34;&gt;/** Why the fit failed. Absent when `ok` is `true`. Not present in `regression`. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;error?&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;FitError&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;  &lt;/div&gt;&#xA;  &lt;div class=&#34;api-symbol__summary&#34;&gt;The result shape returned by &lt;code&gt;regression&lt;/code&gt;, plus two additive fields.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;p&gt;&lt;code&gt;equation&lt;/code&gt;, &lt;code&gt;string&lt;/code&gt;, &lt;code&gt;points&lt;/code&gt;, &lt;code&gt;r2&lt;/code&gt; and &lt;code&gt;predict&lt;/code&gt; are byte-for-byte what the&#xA;original returns on data it handles correctly. &lt;code&gt;ok&lt;/code&gt; and &lt;code&gt;error&lt;/code&gt; are new.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
