From 349b99b3ef62b945de62bf1907de3440ccef7698 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 22 Jul 2022 15:31:05 -0700 Subject: [PATCH] Minor docs cleanup --- packages/website/docs/Api/DistGeneric.mdx | 2 +- .../docs/Discussions/Future-Features.md | 6 ---- .../docs/Guides/DistributionCreation.mdx | 6 ++-- packages/website/docs/Guides/Functions.mdx | 30 ++++++------------- 4 files changed, 13 insertions(+), 31 deletions(-) diff --git a/packages/website/docs/Api/DistGeneric.mdx b/packages/website/docs/Api/DistGeneric.mdx index 982af57c..e37c6f75 100644 --- a/packages/website/docs/Api/DistGeneric.mdx +++ b/packages/website/docs/Api/DistGeneric.mdx @@ -339,7 +339,7 @@ A log loss score. Often that often acts as a [scoring rule](https://en.wikipedia Note that it is fairly slow. ``` -logScore: ({estimate: distribution, ?prior: distribution, answer: distribution|number}) => number +Dist.logScore: ({estimate: distribution, ?prior: distribution, answer: distribution|number}) => number ``` **Examples** diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index d1b45583..6070dbba 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -23,12 +23,6 @@ Squiggle is still very early. The main first goal is to become stable. This mean ## Distribution Features -`Distribution.fromSamples([])` -Converts a list of samples, for example, from Guesstimate, into a distribution shape. Maybe takes a list of optional parameters. - -`Distribution.fromCoordinates({xs, ys})` -Convert XY coordinates into a distribution. Figure out a good way to do this for continuous, discrete, and mixed distributions. - [Metalog Distribution](https://en.wikipedia.org/wiki/Metalog_distribution) Add the Metalog distribution, and some convenient methods for generating these distributions. This might be a bit tricky because we might need or build a library to fit data. There's no Metalog javascript library yet, this would be pretty useful. There's already a Metalog library in Python, so that one could be used for inspiration. diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 95e03b7b..23a4bf0e 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -343,13 +343,13 @@ Creates a [triangular distribution](https://en.wikipedia.org/wiki/Triangular_dis -## FromSamples +## FromList -`fromSamples(samples:number[])` +`SampleSet.fromList(samples:number[])` Creates a sample set distribution using an array of samples. - + ### Arguments diff --git a/packages/website/docs/Guides/Functions.mdx b/packages/website/docs/Guides/Functions.mdx index 56a4929c..28029651 100644 --- a/packages/website/docs/Guides/Functions.mdx +++ b/packages/website/docs/Guides/Functions.mdx @@ -47,7 +47,7 @@ dist1 * dist2`} We also provide concatenation of two distributions as a syntax sugar for `*` - + ### Division @@ -88,16 +88,13 @@ log(dist)`} /> Base `x` #### Validity @@ -114,9 +111,7 @@ For every point on the x-axis, operate the corresponding points in the y axis of TODO: this isn't in the new interpreter/parser yet. ### Pointwise subtraction @@ -124,33 +119,26 @@ dist1 .+ dist2`} TODO: this isn't in the new interpreter/parser yet. ### Pointwise multiplication + ### Pointwise division ### Pointwise exponentiation ## Standard functions on distributions