<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Math on statili</title>
    <link>https://statili.com/docs/math/</link>
    <description>Recent content in Math on statili</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://statili.com/docs/math/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Activation Functions</title>
      <link>https://statili.com/docs/math/activation/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/math/activation/</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/math&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;1 export&lt;/span&gt;&#xA;  &lt;/p&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;sigmoid&#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;#sigmoid&#34; aria-label=&#34;Link to sigmoid&#34;&gt;#&lt;/a&gt;&#xA;      sigmoid&#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/math/src/activation.ts#L33&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/activation.ts:33&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;sigmoid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;z&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;Sigmoid (logistic) activation function: &lt;strong&gt;σ(z) = 1 / (1 + e⁻ᶻ)&lt;/strong&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;p&gt;Maps any real-valued input to the open interval &lt;code&gt;(0, 1)&lt;/code&gt;, making it&#xA;suitable for modelling probabilities. The function is smooth and&#xA;differentiable everywhere, which is why it is used in gradient-based&#xA;optimisation (e.g. logistic regression, neural networks).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Descriptive Statistics</title>
      <link>https://statili.com/docs/math/descriptive/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/math/descriptive/</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/math&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;12 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;#covariance&#34;&gt;covariance&lt;/a&gt;&#xA;    &lt;a href=&#34;#mad&#34;&gt;mad&lt;/a&gt;&#xA;    &lt;a href=&#34;#max&#34;&gt;max&lt;/a&gt;&#xA;    &lt;a href=&#34;#mean&#34;&gt;mean&lt;/a&gt;&#xA;    &lt;a href=&#34;#median&#34;&gt;median&lt;/a&gt;&#xA;    &lt;a href=&#34;#min&#34;&gt;min&lt;/a&gt;&#xA;    &lt;a href=&#34;#pearsoncorrelation&#34;&gt;pearsonCorrelation&lt;/a&gt;&#xA;    &lt;a href=&#34;#quantile&#34;&gt;quantile&lt;/a&gt;&#xA;    &lt;a href=&#34;#range&#34;&gt;range&lt;/a&gt;&#xA;    &lt;a href=&#34;#standarddeviation&#34;&gt;standardDeviation&lt;/a&gt;&#xA;    &lt;a href=&#34;#sum&#34;&gt;sum&lt;/a&gt;&#xA;    &lt;a href=&#34;#variance&#34;&gt;variance&lt;/a&gt;&#xA;  &lt;/nav&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;covariance&#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;#covariance&#34; aria-label=&#34;Link to covariance&#34;&gt;#&lt;/a&gt;&#xA;      covariance&#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/math/src/descriptive.ts#L300&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/descriptive.ts:300&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;covariance&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;xs&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;ys&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;Returns the &lt;strong&gt;sample covariance&lt;/strong&gt; between two equal-length arrays &lt;code&gt;xs&lt;/code&gt; and&#xA;&lt;code&gt;ys&lt;/code&gt; (divided by &lt;code&gt;n − 1&lt;/code&gt;).&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;p&gt;Covariance measures the joint variability of two variables — a positive&#xA;value means they tend to increase together; a negative value means one&#xA;tends to decrease as the other increases.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Distribution</title>
      <link>https://statili.com/docs/math/distribution/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/math/distribution/</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/math&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;5 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;#loggamma&#34;&gt;logGamma&lt;/a&gt;&#xA;    &lt;a href=&#34;#regularizedincompletebeta&#34;&gt;regularizedIncompleteBeta&lt;/a&gt;&#xA;    &lt;a href=&#34;#studenttcdf&#34;&gt;studentTCdf&lt;/a&gt;&#xA;    &lt;a href=&#34;#studenttquantile&#34;&gt;studentTQuantile&lt;/a&gt;&#xA;    &lt;a href=&#34;#studentttwotailedp&#34;&gt;studentTTwoTailedP&lt;/a&gt;&#xA;  &lt;/nav&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;loggamma&#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;#loggamma&#34; aria-label=&#34;Link to logGamma&#34;&gt;#&lt;/a&gt;&#xA;      logGamma&#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/math/src/distribution.ts#L41&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/distribution.ts:41&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;logGamma&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;:&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;Natural logarithm of the gamma function, &lt;strong&gt;ln Γ(x)&lt;/strong&gt;, via the Lanczos&#xA;approximation.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;p&gt;Γ(x) overflows a double for x greater than about 171, so the log form is used&#xA;throughout — every consumer here needs ratios of gamma functions, which become&#xA;differences of logs and stay in range.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linear Algebra</title>
      <link>https://statili.com/docs/math/linalg/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/math/linalg/</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/math&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;1 export&lt;/span&gt;&#xA;  &lt;/p&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;gaussianelimination&#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;#gaussianelimination&#34; aria-label=&#34;Link to gaussianElimination&#34;&gt;#&lt;/a&gt;&#xA;      gaussianElimination&#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/math/src/linalg.ts#L40&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/linalg.ts:40&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;gaussianElimination&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;input&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;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;&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&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;Solves the linear system &lt;strong&gt;Ax = b&lt;/strong&gt; via &lt;strong&gt;Gaussian elimination with partial&#xA;pivoting&lt;/strong&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;p&gt;The augmented matrix &lt;code&gt;[A | b]&lt;/code&gt; is passed as &lt;code&gt;input&lt;/code&gt;: an &lt;code&gt;n × (n+1)&lt;/code&gt; matrix&#xA;where the first &lt;code&gt;n&lt;/code&gt; columns represent &lt;code&gt;A&lt;/code&gt; and the last column represents&#xA;&lt;code&gt;b&lt;/code&gt;. The function operates on a deep copy and does &lt;strong&gt;not&lt;/strong&gt; mutate its input.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Numeric Utilities</title>
      <link>https://statili.com/docs/math/numeric/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://statili.com/docs/math/numeric/</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/math&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;#clamp&#34;&gt;clamp&lt;/a&gt;&#xA;    &lt;a href=&#34;#isfinitenumber&#34;&gt;isFiniteNumber&lt;/a&gt;&#xA;    &lt;a href=&#34;#lerp&#34;&gt;lerp&lt;/a&gt;&#xA;    &lt;a href=&#34;#round&#34;&gt;round&lt;/a&gt;&#xA;  &lt;/nav&gt;&lt;section class=&#34;api-symbol&#34; id=&#34;clamp&#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;#clamp&#34; aria-label=&#34;Link to clamp&#34;&gt;#&lt;/a&gt;&#xA;      clamp&#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/math/src/numeric.ts#L70&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/numeric.ts:70&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;clamp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;lo&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;hi&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;value&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;Clamps &lt;code&gt;value&lt;/code&gt; to the closed interval &lt;code&gt;[lo, hi]&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;Useful when mapping statistical outputs (e.g. probabilities, normalised&#xA;scores) to a bounded domain before rendering.&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;lo&lt;/td&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;Lower bound (inclusive).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;hi&lt;/td&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;Upper bound (inclusive).&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;        &lt;td&gt;value&lt;/td&gt;&#xA;        &lt;td&gt;number&lt;/td&gt;&#xA;        &lt;td&gt;The value to clamp.&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;&lt;div class=&#34;api-returns__prose&#34;&gt;&lt;code&gt;lo&lt;/code&gt; if &lt;code&gt;value &amp;lt; lo&lt;/code&gt;, &lt;code&gt;hi&lt;/code&gt; if &lt;code&gt;value &amp;gt; hi&lt;/code&gt;, otherwise &lt;code&gt;value&lt;/code&gt;.&lt;/div&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;nx&#34;&gt;clamp&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;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0.3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// 0&#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;clamp&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;mf&#34;&gt;1.7&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;// 1&#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;clamp&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;mf&#34;&gt;0.5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;// 0.5&#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;&#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;// Partial application — create a unit-clamp helper&#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;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;unitClamp&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clamp&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;&#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;unitClamp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;sigmoid&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;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// 0 (not quite, but clamped to 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;&lt;section class=&#34;api-symbol&#34; id=&#34;isfinitenumber&#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;#isfinitenumber&#34; aria-label=&#34;Link to isFiniteNumber&#34;&gt;#&lt;/a&gt;&#xA;      isFiniteNumber&#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/math/src/numeric.ts#L46&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/numeric.ts:46&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;isFiniteNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;: &lt;span class=&#34;kt&#34;&gt;unknown&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;kr&#34;&gt;boolean&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;Returns &lt;code&gt;true&lt;/code&gt; when &lt;code&gt;value&lt;/code&gt; is a finite, non-NaN number (i.e., safe for&#xA;arithmetic). Rejects &lt;code&gt;NaN&lt;/code&gt;, &lt;code&gt;Infinity&lt;/code&gt;, &lt;code&gt;-Infinity&lt;/code&gt;, &lt;code&gt;null&lt;/code&gt;, and &lt;code&gt;undefined&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;Replaces the inline &lt;code&gt;isValid&lt;/code&gt; guard scattered across &lt;code&gt;@statili/stats&lt;/code&gt;&#xA;regression methods.&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;value&lt;/td&gt;&#xA;        &lt;td&gt;unknown&lt;/td&gt;&#xA;        &lt;td&gt;Any value to test.&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;boolean&lt;/code&gt;&lt;div class=&#34;api-returns__prose&#34;&gt;&lt;code&gt;true&lt;/code&gt; if &lt;code&gt;value&lt;/code&gt; is a finite number, &lt;code&gt;false&lt;/code&gt; otherwise.&lt;/div&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;nx&#34;&gt;isFiniteNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;3.14&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;      &lt;span class=&#34;c1&#34;&gt;// true&#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;isFiniteNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;NaN&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;       &lt;span class=&#34;c1&#34;&gt;// 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;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isFiniteNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;Infinity&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// 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;c1&#34;&gt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isFiniteNumber&lt;/span&gt;&lt;span class=&#34;p&#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;      &lt;span class=&#34;c1&#34;&gt;// false&#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;&lt;section class=&#34;api-symbol&#34; id=&#34;lerp&#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;#lerp&#34; aria-label=&#34;Link to lerp&#34;&gt;#&lt;/a&gt;&#xA;      lerp&#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/math/src/numeric.ts#L95&#34;&#xA;       target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;packages/math/src/numeric.ts:95&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;lerp&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;a&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;b&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;t&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;Linearly interpolates between &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt; by factor &lt;code&gt;t&lt;/code&gt;.&lt;/div&gt;&#xA;  &lt;div class=&#34;prose&#34;&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;t = 0&lt;/code&gt; returns &lt;code&gt;a&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;t = 1&lt;/code&gt; returns &lt;code&gt;b&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;t = 0.5&lt;/code&gt; returns the midpoint&lt;/li&gt;&#xA;&lt;li&gt;Values outside &lt;code&gt;[0, 1]&lt;/code&gt; extrapolate beyond the endpoints&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Handy for generating evenly-spaced prediction points along a regression&#xA;curve or animating transitions between two chart states.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
