From b28df258e1a682cd6663ff19fd839536d6b59404 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Tue, 3 May 2022 11:06:53 -0400 Subject: [PATCH] Ran formatter --- .../SymbolicDist/SymbolicDist.res | 2 +- .../website/docs/Features/Distributions.mdx | 31 ++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index 94fd42ca..58129d0b 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -230,7 +230,7 @@ module Float = { let inv = (p, t: t) => p < t ? 0.0 : 1.0 let mean = (t: t) => Ok(t) let sample = (t: t) => t - let toString = Js.Float.toString + let toString = (t:t) => j`Delta($t)` } module From90thPercentile = { diff --git a/packages/website/docs/Features/Distributions.mdx b/packages/website/docs/Features/Distributions.mdx index 5d840ee0..c57ed075 100644 --- a/packages/website/docs/Features/Distributions.mdx +++ b/packages/website/docs/Features/Distributions.mdx @@ -220,9 +220,12 @@ Creates a [uniform distribution]( @@ -234,8 +237,11 @@ with values at 1 and 2. Therefore, `mixture(1,2,normal(5,2))` is the same as `mi - - + + + + + @@ -315,8 +321,6 @@ Creates an [exponential distribution](https://en.wikipedia.org/wiki/Exponential_ Creates a [triangular distribution](https://en.wikipedia.org/wiki/Triangular_distribution) with the given low, mode, and high values. -#### Validity - ### Arguments - `low`: Number @@ -336,3 +340,16 @@ Creates a sample set distribution using an array of samples. ### Arguments - `samples`: An array of at least 5 numbers. + + +

+ Samples are converted into{" "} + PDF{" "} + shapes automatically using{" "} + + kernel density estimation + {" "} + and an approximated bandwidth. Eventually Squiggle will allow for more + specificity. +

+