From 68238ba91437d142028d3684811983cf36b91293 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Sun, 24 Jul 2022 16:37:24 -0700 Subject: [PATCH 01/13] Added new logo --- packages/website/docusaurus.config.js | 2 +- packages/website/src/css/custom.css | 6 +++++- packages/website/src/pages/index.js | 7 ++++++- packages/website/static/img/favicon.ico | Bin 12704 -> 12896 bytes packages/website/static/img/squiggle-logo.png | Bin 0 -> 12896 bytes 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 packages/website/static/img/squiggle-logo.png diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 16ff6afa..06c7b504 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -56,7 +56,7 @@ const config = { title: "Squiggle", logo: { alt: "Squiggle Logo", - src: "img/quri-logo.png", + src: "img/squiggle-logo.png", }, items: [ { diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index f5aa047d..7e4f5fe5 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -60,7 +60,7 @@ html[data-theme="dark"] .docusaurus-highlight-code-line { } .hero__subtitle2 { - color: #ba3e3e; + color: #777; font-size: 1.5em; font-family: "Lora"; font-weight: 500; @@ -88,6 +88,10 @@ h2 { font-weight: 700; } +.navbar__logo { + height: 1.5rem; +} + :root { /* --ifm-font-family-base: 'Lora'; */ } diff --git a/packages/website/src/pages/index.js b/packages/website/src/pages/index.js index 05278aad..fdfe3b45 100644 --- a/packages/website/src/pages/index.js +++ b/packages/website/src/pages/index.js @@ -1,7 +1,6 @@ import React from "react"; import clsx from "clsx"; import Layout from "@theme/Layout"; -import Link from "@docusaurus/Link"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; import styles from "./index.module.css"; import HomepageFeatures from "../components/HomepageFeatures"; @@ -11,6 +10,12 @@ function HomepageHeader() { return (
+ {'Docusaurus

{siteConfig.title}

Early Access

{siteConfig.tagline}

diff --git a/packages/website/static/img/favicon.ico b/packages/website/static/img/favicon.ico index d88e28c49f892a935b93c51112215cfa7a8322dc..5a29e1682941102ce60717b2d30bc891b2be859b 100644 GIT binary patch literal 12896 zcmaibbwJZ?_cuADRg^|jLSleOjGQPTAQ-gt28X1!^toc=rNMnodKz{b5)u-6ZLK>GiGQ1julfrB;``B% z?h6tUN@Lh#6E71zU638zRl)`Ww}ndhxw;eSBqU0ze(pAQ&QLENTc`ufO_^`Ap_z{d z22tiSzNIIr=dKQQglPqMKpzF%e{2`vY^MO>Q&pi+@&ge8T%lezJbtb&Zk`}NWxhYS zAmZoq$3Q-wKP+C(%6ukz20ZF;4=B$qiCYqqd@3|NN*)k<(8D_#|Cmf1Df2mcdAWmt zKwn>93E!I%a1RHdl!Af+P*NHwEiF#u5cl+V^Rn?1ck|>whxiNQ4%E}m1Lp1pgS+vZ zW7^oly}gwA_=t3#e}F^m{)O%C?cwqV8Da;7xyZ=k6zlr!4`M)L--TgmL@w0LNpP2RZ z{@?7bu75Mb)9bDe(Q*F>!ryfIrvT5#{_arVL#QX*+rtie*N5mm{y&a8_Y24X<_C2# zxdS6Q)sq+vWj-l+h5w6c`ZucVzp3hQ7r4hGVj4n;)BZd@_Z>*v)y4s841;(%{u}Mz z1YM|`!(WuYkp584wR7=4PX|Lc7||Z-f1{cFo2JYsCk^}$L8kvB>0hw`{n1Yk4k4;{ z^AF&^N!se_1|D#Gm=4St$isS#fEJza$U?2O`de+56wI@gj0bOA_;0 zQchf2=CPCv=$14{<`!`Xl9c>|{D+%ZKM)%)oBtpGc@^*|LF__-j{|~v3piloU_fHw}@ccU>;J1FFjy+jNC zqI$yZy?kvvpkN1LUMcf|?d@U22>SCFoEHoau}CE)ZvB0RuOpO*_P@Im_@AcyQ#B>v ze<}Z$<^R!1i1Yq>M(j|;RtNl7uOklr)h(fJ#1`p6?1f8?kNHVRNW);nO!%)1AR!Ts z^^P47z4PEor>ebU+l6c~F+utwUe$Xp38~NGWHi`Z=9J*}BaK@Dn|kkD5=-8pJ6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h^> zzc;|cRDJe=mrs7(^3%E!#^_mSf)HLw(*y7Ma80Mzd;&z^VbV+wG@jLenI-BTGGmTc&;LLFcJTjv>>I_MMC6>f1zunJKj1GHAO%@v KneS4jAO8==>R7G- diff --git a/packages/website/static/img/squiggle-logo.png b/packages/website/static/img/squiggle-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..5a29e1682941102ce60717b2d30bc891b2be859b GIT binary patch literal 12896 zcmaibbwJZ?_cuADRg^|jLSleOjGQPTAQ-gt28X1!^toc=rNMnodKz{b5)u-6ZLK>GiGQ1julfrB;``B% z?h6tUN@Lh#6E71zU638zRl)`Ww}ndhxw;eSBqU0ze(pAQ&QLENTc`ufO_^`Ap_z{d z22tiSzNIIr=dKQQglPqMKpzF%e{2`vY^MO>Q&pi+@&ge8T%lezJbtb&Zk`}NWxhYS zAmZoq$3Q-wKP+C(%6ukz20ZF;4=B$qiCYqqd@3|NN*)k<(8D_#|Cmf1Df2mcdAWmt zKwn>93E!I%a1RHdl!Af+P*NHwEiF#u5cl+V^Rn?1ck|>whxiNQ4%E}m1Lp1pgS+vZ zW7^oly}gwA_=t3#e}F^m{)O%C?cwqV8Da;7xyZ=k6zlr!4`M)L--TgmL@w0LNpP2RZ z{@?7bu75Mb)9bDe(Q*F>!ryfIrvT5#{_arVL#QX*+rtie*N5mm{y&a8_Y24X<_C2# zxdS6Q)sq+vWj-l+h5w6c`ZucVzp3hQ7r4hGVj4n;)BZd@_Z>*v)y4s841;(%{u}Mz z1YM|`!(WuYkp584wR7=4PX|Lc7||Z-f1{cFo2JYsCk^}$L8kvB>0hw`{n1Yk4k4;{ z^AF&^N!se_1|D#Gm=4St$isS#fEJza$U?2O`de+56wI@gj0bOA_;0 zQchf2=CPCv=$14{<`!`Xl9c>|{D+%ZKM)%)oBtpGc@^*|LF__-j{|~v3piloU_fHw}@ccU>;J1FFjy+jNC zqI$yZy?kvvpkN1LUMcf|?d@U22>SCFoEHoau}CE)ZvB0RuOpO*_P@Im_@AcyQ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}zrCm&)$ zT{shN*&|T^;T@9cosL$KMbmK&6v!#c^! zC^w!IjIbZeinK+<12Wo=fO}!+h?T??#M?UJIesa%ChfH@$0QInpi>>QZiBHRVH8p( zO(NInpgo<*13MhxYFa;&d)9;^!d9kJRG^EeOPI|JQ1u>q6Ig)-GX~?w$sXl!KT~{5 zP(E~)6z`n5LwS5zfR^D{u*I1($YzRu%6?IzlW62Mt&le@1EJ|XE(V0RZamKMVVhc&z(A=QreR;nCi0mGs*|4r zeZ!B%{OV@au<@|Z)U}Fvfz}(2gAeSdUep<;2ueE*|?OFbgOcIz8g^02zv}TBYrzZHms0R z3OHf#thv^BKpiDGD^F85dwVlpRA{#tGjk-6qcCEK%!^sc6k^QVCXJu zkGDAE?zed-HB7hY*5bvntfAZ7GED^FzbVQ&fM zbBpdH+{UXFEnO-bvsZQ6gO_h!H}xm`{Oofhr>FMHy>iB3I>)Tk>3DDxZG1%yWlT#G z)eM7fGylnP@72^akNDJTYd4m>G_`T;_wnep@WD%8-$$qj8kfvCDMX<;J$t}KeKHX% zYQ4%Np8>;Jb|6;IB=WPG6p1!3{$B{}IJnli$O@)Lr#>V(Y WvZnVA-_HLrMEmajJEga+!~YM=$BMoH literal 0 HcmV?d00001 From 3f8b99aa3ae77c2c297eacfaad5d8a822ca902d9 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 27 Jul 2022 16:54:25 -0700 Subject: [PATCH 02/13] Improving Overview --- .../docs/Discussions/Future-Features.md | 50 +------------- packages/website/docs/Guides/Language.mdx | 13 ++++ packages/website/docs/Introduction.md | 30 -------- packages/website/docs/Overview.md | 68 +++++++++++++++++++ packages/website/docusaurus.config.js | 7 +- packages/website/sidebars.js | 4 +- 6 files changed, 91 insertions(+), 81 deletions(-) delete mode 100644 packages/website/docs/Introduction.md create mode 100644 packages/website/docs/Overview.md diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index 6070dbba..a7f24545 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -3,23 +3,15 @@ title: Future Features sidebar_position: 3 --- -Squiggle is still very early. The main first goal is to become stable. This means having a clean codebase, having decent test coverage, and having a syntax we are reasonably confident in. Later on, there are many other features that will be interesting to explore. +Squiggle is still very early. The main first goal is to become stable (to reach version 1.0). Right now we think it is useable to use for small projects, but do note that there are very likely some math bugs and performance problems. ## Programming Language Features -- Equality (a == b) -- If/else statements -- Arrays - Tables / Matrices -- Simple objects - A simple type system -- Simple module system (`Dist.Normal` instead of `normal`) - A simple time library & notation - Optional and default paramaters for functions -- Anonymous Functions (This is particularly convenient in cases where tiny functions are submitted in forecasting competitions) - A notation to limit the domain of functions. For example, maybe a function only applies for t=[2 to 20] -- Custom parser (Right now we're using Math.js's parser, which doesn't give us much flexibility) -- "Partial-domain" distributions. For example, maybe someone has a distribution for when AGI will happen, but doesn't want to make any estimates past 2200. ## Distribution Features @@ -34,12 +26,6 @@ Takes a distribution and smoothens it. For example, [Elicit Forecast](https://fo **Probabilities** Right now Squiggle mostly works with probability distributions only, but it should also work smoothly with probabilities. -**Scoring** -Have functions to score probabilities, probability distributions, and functions that return probability distributions. - -**Full javascript library** -A full Javascript library that accesses most of the probabilistic functionality of Squiggle, but can be used directly in javascript functions. - **Importance & quality scores** Workflows/functionality to declare the importance and coveredness of each part of the paramater space. For example, some subsets of the paramater space of a function might be much more important to get right than others. Similarly, the analyst might be much more certain about some parts than others. Ideally. they could decline sections. @@ -52,12 +38,6 @@ Of course, we'd also need good math for how the scoring should work, exactly. This interface should also be able to handle changing Squiggle values. This is because people would be likely to want to update their functions over time, and that should be taken into account for scoring. -**Easily call other functions** -It would be great to be able to call other people's Squiggle functions, from other Squiggle functions. This could raise a whole bunch of challenging issues. Additionally, it would be neat to call other data, both from knowledge graphs, and from regular APIs. Note that this could obviously complicate scoring a lot; I imagine that either easy scoring, or simple data fetching, would have to accept sacrifices. - -**Correlated uncertainties** -Right now there's no functionality to declare that two different distributions are correlated. - **Static / Sensitivity Analysis** Guesstimate has Sensitivity analysis that's pretty useful. This could be quite feasible to add, though it will likely require some thinking. @@ -70,15 +50,6 @@ Right now, Monte Carlo simulations are totally random. It would be nicer to be a ## Major Standard Language Features - Some testing story. -- A custom code highlighting format. -- Possibly a decent web GUI (a much more advanced playground). -- A VS Code extention and similar. - -## Bugs - -- Discrete distributions are particularly buggy. Try `mm(1,2,3,4,5,6,7,8,9,10) .* (5 to 8)` - -## New Functions ### Distributions @@ -86,21 +57,4 @@ Right now, Monte Carlo simulations are totally random. It would be nicer to be a cauchy(); pareto(); metalog(); -``` - -Possibly change mm to mix, or mx(). Also, change input format, maybe to mx([a,b,c], [a,b,c]). - -### Functions - -```js -samples(distribution, n); -toPdf(distribution); -toCdf(distribution); -toHash(distribution); -trunctate(distribution, leftValue, rightValue); -leftTrunctate(distribution, leftValue); -rightTrunctate(distribution, rightValue); -distributionFromSamples(array, params); -distributionFromPoints(); -distributionFromHash(); -``` +``` \ No newline at end of file diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index 90ee25b5..61882308 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -47,6 +47,19 @@ f`} +### Comments + + + +### Pipes + + truncateLeft(3) |> SampleSet.fromDist`} /> + ## See more - [Distribution creation](./DistributionCreation) diff --git a/packages/website/docs/Introduction.md b/packages/website/docs/Introduction.md deleted file mode 100644 index 22359de2..00000000 --- a/packages/website/docs/Introduction.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -sidebar_position: 1 -title: Introduction ---- - -Squiggle is a simple programming language for intuitive probabilistic estimation. It's meant for quantitative forecasting and evaluations. - -The basics of Squiggle can be pretty simple and intuitive. The more advanced functionality can take some time to learn. - -## What Squiggle Is - -- A simple programming language for doing math with probability distributions -- An embeddable language that can be used in Javascript applications -- A tool to embed functions as forecasts that can be embedded in other applications - -## What Squiggle Is Not - -- A complete replacement for enterprise Risk Analysis tools (See Crystal Ball, @Risk, Lumina Analytica) -- A Probabilistic Programming Language with backwards inference and sophisticated sampling algorithms. (See [PPLs](https://en.wikipedia.org/wiki/Probabilistic_programming)) -- A visual tool aimed at casual users (see Guesstimate, Causal) - -## Get started - -- [Gallery](./Discussions/Gallery) -- [Squiggle playground](/playground) -- [Language basics](./Guides/Language) -- [Squiggle functions source of truth](./Guides/Functions) -- [Known bugs](./Discussions/Bugs) -- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) -- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle) diff --git a/packages/website/docs/Overview.md b/packages/website/docs/Overview.md new file mode 100644 index 00000000..a843c162 --- /dev/null +++ b/packages/website/docs/Overview.md @@ -0,0 +1,68 @@ +--- +sidebar_position: 1 +title: Overview +--- + +Squiggle is a minimalist programming language for probabilistic estimation. It's meant for intuitively-driven quantitative estimation instead of data analysis or data-driven statistical techniques. + +The basics of Squiggle are fairly straightforward. This can be enough for many models. The more advanced functionality can take some time to learn. + +## Using Squiggle +You can currently interact with Squiggle in a few ways: + +**[Playground](/playground)** +The [Squiggle Playground](/playground) is a nice tool for working with small models and making prototypes. You can make simple sharable links, but you can't save models that change over time. + +**[Typescript Library](https://www.npmjs.com/package/@quri/squiggle-lang)** +Squiggle is built using [Rescript](https://rescript-lang.org/), and is accessible via a simple Typescript library. You can use this library to either run Squiggle code in full, or to call select specific functions within Squiggle (though this latter functionality is very minimal). + +**[React Components Library](https://www.npmjs.com/package/@quri/squiggle-components)** +All of the components used in the playground and documentation are available in a separate component NPM repo. You can see the full Storybook of components [here](https://squiggle-components.netlify.app). + +**[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** +There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. + +## Squiggle Vs. Other Tools + +### What Squiggle Is + +- A simple programming language for doing math with probability distributions. +- An embeddable language that can be used in Javascript applications. +- A tool to encode functions as forecasts that can be embedded in other applications. + +### What Squiggle Is Not + +- A complete replacement for enterprise Risk Analysis tools. (See [Crystal Ball](https://www.oracle.com/applications/crystalball/), [@Risk](https://www.palisade.com/risk/), [Lumina Analytica](https://lumina.com/)) +- A [probabilistic programming language](https://en.wikipedia.org/wiki/Probabilistic_programming). Squiggle does not support Bayesian inference. +- A tool for substantial data analysis. (See programming languages like [Python](https://www.python.org/) or [Julia](https://julialang.org/)) +- A programming language for anything other than estimation. +- A visually-driven tool. (See [Guesstimate](https://www.getguesstimate.com/) and [Causal](https://causal.app/)) + +### Strengths +- Simple and readable syntax, especially for dealing with probabilistic math. +- Fast for relatively small models. Strong for rapid prototyping. +- Optimized for using some numeric and symbolic approaches, not just Monte Carlo. +- Embeddable in Javascript. +- Free and open-source. + +### Weaknesses +- Limited scientific capabilities. +- Much slower than serious probabilistic programming languages on sizeable models. +- Can't do Bayesian backwards inference. +- Essentially no support for libraries or modules (yet). +- Still very new, so a tiny ecosystem. +- Still very new, so there are likely math bugs. +- Generally not as easy to use as Guesstimate or Causal, especially for non programmers. + +## Organization +Squiggle is one of the main projects of [The Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). QURI is a nonprofit funded primarily by [Effective Altruist](https://www.effectivealtruism.org/) donors. + +## Get started + +- [Gallery](./Discussions/Gallery) +- [Squiggle playground](/playground) +- [Language basics](./Guides/Language) +- [Squiggle functions source of truth](./Guides/Functions) +- [Known bugs](./Discussions/Bugs) +- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) +- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle) diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 06c7b504..319dbee6 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -61,7 +61,7 @@ const config = { items: [ { type: "doc", - docId: "Introduction", + docId: "Overview", position: "left", label: "Documentation", }, @@ -83,6 +83,11 @@ const config = { label: "GitHub", position: "right", }, + { + href: "https://quantifieduncertainty.org/", + label: "QURI", + position: "right", + }, ], }, footer: { diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index a22b80a8..5c33d56c 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -23,8 +23,8 @@ const sidebars = { tutorialSidebar: [ { type: "doc", - id: "Introduction", - label: "Introduction", + id: "Overview", + label: "Overview", }, { type: "doc", From 327dc521f1ecd1316102d3241bba562bbc56b8a0 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 27 Jul 2022 21:08:10 -0700 Subject: [PATCH 03/13] Modifiying Overview page and Guides --- .../docs/Api/{DistGeneric.mdx => Dist.mdx} | 0 .../docs/Guides/DistributionCreation.mdx | 2 +- packages/website/docs/Guides/Functions.mdx | 2 +- packages/website/docs/Guides/Language.mdx | 68 +++++++++++++------ packages/website/docs/Overview.md | 7 ++ packages/website/docusaurus.config.js | 2 +- 6 files changed, 59 insertions(+), 22 deletions(-) rename packages/website/docs/Api/{DistGeneric.mdx => Dist.mdx} (100%) diff --git a/packages/website/docs/Api/DistGeneric.mdx b/packages/website/docs/Api/Dist.mdx similarity index 100% rename from packages/website/docs/Api/DistGeneric.mdx rename to packages/website/docs/Api/Dist.mdx diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 23a4bf0e..a0833a6d 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -1,5 +1,5 @@ --- -title: "Distribution Creation" +title: "Distributions: Creation" sidebar_position: 2 --- diff --git a/packages/website/docs/Guides/Functions.mdx b/packages/website/docs/Guides/Functions.mdx index 843cf888..4a4bc170 100644 --- a/packages/website/docs/Guides/Functions.mdx +++ b/packages/website/docs/Guides/Functions.mdx @@ -1,5 +1,5 @@ --- -title: "Distribution Functions" +title: "Distributions: Key Functions" sidebar_position: 3 --- diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index 61882308..c5b92fd1 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -5,63 +5,93 @@ title: Language Basics import { SquiggleEditor } from "../../src/components/SquiggleEditor"; -## Expressions +Squiggle supports some simple types and language features. -### Numbers +## Numbers -### Distributions +## Distributions +There are several ways of easily entering distributions. See the [documentation](/docs/Api/Dist/) on distributions for a complete API. -### Lists +## Lists +Squiggle lists can accept items of any type, similar to those in Python. [API](/docs/Api/List). - - -### Dictionaries +## Dictionaries +Squiggle dictionaries work similarly to Python dictionaries. [API](/docs/Api/Dictionary). -### Functions +## Functions -### Anonymous Functions +## Anonymous Functions -### Comments +## Comments - -### Pipes +## Pipes - truncateLeft(3) |> SampleSet.fromDist`} /> +Squiggle features [data-first](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/) pipes. Functions in the standard library are organized to make this convenient. + truncateLeft(3) |> SampleSet.fromDist |> SampleSet.map({|r| r + 10})`} /> -## See more +## Standard Library -- [Distribution creation](./DistributionCreation) -- [Functions reference](./Functions) -- [Gallery](../Discussions/Gallery) +Squiggle features a simple [standard libary](/docs/Api/Dist). + +Most functions are namespaced under their respective types to keep functionality distinct. Certain popular functions are usable without their namespaces. + +For example, + SampleSet.fromList // namespaces required +b = normal(5,2) // namespace not required +c = 5 to 10 // namespace not required +""`} /> + +## Number Prefixes +Numbers support a few scientific notation prefixes. + +| prefix | multiplier | +|-----|-------| +| n | 10^-9 | +| m | 10^-3 | +| k | 10^3 | +| M | 10^6 | +| B,G | 10^9 | +| T | 10^12 | +| P | 10^15 | + + + + +## Gotchas and Key Limitations +**** \ No newline at end of file diff --git a/packages/website/docs/Overview.md b/packages/website/docs/Overview.md index a843c162..ef330ae4 100644 --- a/packages/website/docs/Overview.md +++ b/packages/website/docs/Overview.md @@ -22,6 +22,13 @@ All of the components used in the playground and documentation are available in **[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. +## Very simple model + +```squiggle +//Write comments like this +/* +``` + ## Squiggle Vs. Other Tools ### What Squiggle Is diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 3f7a046f..f48ac952 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -68,7 +68,7 @@ const config = { }, { type: "doc", - docId: "Api/DistGeneric", + docId: "Api/Dist", position: "left", label: "API", }, From 31626b05c4176ee7f8913a9403c152507acb88bc Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Wed, 27 Jul 2022 22:09:43 -0700 Subject: [PATCH 04/13] Added a simple example --- .../src/components/SquiggleChart.tsx | 2 +- packages/website/docs/Guides/Language.mdx | 4 -- .../docs/{Overview.md => Overview.mdx} | 58 ++++++++++++++++--- 3 files changed, 52 insertions(+), 12 deletions(-) rename packages/website/docs/{Overview.md => Overview.mdx} (64%) diff --git a/packages/components/src/components/SquiggleChart.tsx b/packages/components/src/components/SquiggleChart.tsx index 86b2b078..00688512 100644 --- a/packages/components/src/components/SquiggleChart.tsx +++ b/packages/components/src/components/SquiggleChart.tsx @@ -73,7 +73,7 @@ export const SquiggleChart: React.FC = React.memo( expY = false, diagramStart = 0, diagramStop = 10, - diagramCount = 100, + diagramCount = 20, tickFormat, minX, maxX, diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index c5b92fd1..71f7e888 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -91,7 +91,3 @@ Numbers support a few scientific notation prefixes. - - -## Gotchas and Key Limitations -**** \ No newline at end of file diff --git a/packages/website/docs/Overview.md b/packages/website/docs/Overview.mdx similarity index 64% rename from packages/website/docs/Overview.md rename to packages/website/docs/Overview.mdx index ef330ae4..528e1a88 100644 --- a/packages/website/docs/Overview.md +++ b/packages/website/docs/Overview.mdx @@ -3,10 +3,61 @@ sidebar_position: 1 title: Overview --- +import { SquiggleEditor } from "../src/components/SquiggleEditor"; + Squiggle is a minimalist programming language for probabilistic estimation. It's meant for intuitively-driven quantitative estimation instead of data analysis or data-driven statistical techniques. The basics of Squiggle are fairly straightforward. This can be enough for many models. The more advanced functionality can take some time to learn. +## Simple example +Say you're trying to estimate the number of piano tuners in New York City. You can build a simple model of this, like so. +(Tip: This is interactive! Feel free to modify the code directly.) + + + +--- + +Now let's take this a bit further. Let's imagine that you think that NYC will grow over time, and you'd like to estimate the number of piano tuners for every point in time for the next few years. + + + +If you haven't noticed yet, you can hover over the `populationAtTime` graph to see the distribution of population at different points in time. + + + ## Using Squiggle You can currently interact with Squiggle in a few ways: @@ -22,13 +73,6 @@ All of the components used in the playground and documentation are available in **[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. -## Very simple model - -```squiggle -//Write comments like this -/* -``` - ## Squiggle Vs. Other Tools ### What Squiggle Is From f7834b0f46ba79d75e0dcf6bd11f3c6501fa47e3 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 28 Jul 2022 16:59:52 -0700 Subject: [PATCH 05/13] Lots of minor touch-ups --- packages/website/docs/Discussions/Bugs.mdx | 9 ++- .../docs/Discussions/Future-Features.md | 24 +++----- packages/website/docs/Discussions/Gallery.md | 1 + .../docs/Guides/DistributionCreation.mdx | 60 +++++++++++++++---- packages/website/docs/Guides/Functions.mdx | 2 +- packages/website/docs/Overview.mdx | 19 ++---- 6 files changed, 73 insertions(+), 42 deletions(-) diff --git a/packages/website/docs/Discussions/Bugs.mdx b/packages/website/docs/Discussions/Bugs.mdx index 49bf347b..e70e45b3 100644 --- a/packages/website/docs/Discussions/Bugs.mdx +++ b/packages/website/docs/Discussions/Bugs.mdx @@ -7,7 +7,12 @@ import { SquiggleEditor } from "../../src/components/SquiggleEditor"; Much of the Squiggle math is imprecise. This can cause significant errors, so watch out. -Below are some specific examples to watch for. We'll work on improving these over time and adding much better warnings and error management. +Below are a few specific examples to watch for. We'll work on improving these over time and adding much better warnings and error management. + +## Operations on very small or large numbers, silently round to 0 and 1 + +Squiggle is poor at dealing with very small or large numbers, given fundamental limitations of floating point precision. +See [this Github Issue](https://github.com/quantified-uncertainty/squiggle/issues/834). ## Mixtures of distributions with very different means @@ -33,4 +38,4 @@ The means of sample set distributions can vary dramatically, especially as the n defaultCode={`symbolicDist = 5 to 50333333 sampleSetDist = SampleSet.fromDist(symbolicDist) [mean(symbolicDist), mean(sampleSetDist), symbolicDist, sampleSetDist]`} -/> +/> \ No newline at end of file diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index a7f24545..3ad0e455 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -9,12 +9,15 @@ Squiggle is still very early. The main first goal is to become stable (to reach - Tables / Matrices - A simple type system -- A simple time library & notation - Optional and default paramaters for functions - A notation to limit the domain of functions. For example, maybe a function only applies for t=[2 to 20] +- Some story for tests +- Much better code editor integration ## Distribution Features +There are many important distribution types that Squiggle doesn't yet support. Some key functions we'd like include: + [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. @@ -26,9 +29,6 @@ Takes a distribution and smoothens it. For example, [Elicit Forecast](https://fo **Probabilities** Right now Squiggle mostly works with probability distributions only, but it should also work smoothly with probabilities. -**Importance & quality scores** -Workflows/functionality to declare the importance and coveredness of each part of the paramater space. For example, some subsets of the paramater space of a function might be much more important to get right than others. Similarly, the analyst might be much more certain about some parts than others. Ideally. they could decline sections. - **An interface to interpret & score Squiggle files** Squiggle functions need to be aggregated and scored. This should be done outside one Squiggle file. Maybe this should also be done in Squiggle, or maybe it should be done using Javascript. @@ -38,6 +38,9 @@ Of course, we'd also need good math for how the scoring should work, exactly. This interface should also be able to handle changing Squiggle values. This is because people would be likely to want to update their functions over time, and that should be taken into account for scoring. +**Importance & quality scores** +Workflows/functionality to declare the importance and coveredness of each part of the paramater space. For example, some subsets of the paramater space of a function might be much more important to get right than others. Similarly, the analyst might be much more certain about some parts than others. Ideally. they could decline sections. + **Static / Sensitivity Analysis** Guesstimate has Sensitivity analysis that's pretty useful. This could be quite feasible to add, though it will likely require some thinking. @@ -47,14 +50,5 @@ It might be useful to allow people to annotate functions and variables with long **Randomness Seeds** Right now, Monte Carlo simulations are totally random. It would be nicer to be able to enter a seed somehow in order to control the randomness. Or, with the same seed, the function should always return the same values. This would make debugging and similar easier. -## Major Standard Language Features - -- Some testing story. - -### Distributions - -```js -cauchy(); -pareto(); -metalog(); -``` \ No newline at end of file +**Caching/Memoization** +There are many performance improvements that Squiggle could have. We'll get to some of them eventually. \ No newline at end of file diff --git a/packages/website/docs/Discussions/Gallery.md b/packages/website/docs/Discussions/Gallery.md index d0ea8335..c9498ca0 100644 --- a/packages/website/docs/Discussions/Gallery.md +++ b/packages/website/docs/Discussions/Gallery.md @@ -5,4 +5,5 @@ title: Gallery - [Adjusting probabilities for the passage of time](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3/p/j8o6sgRerE3tqNWdj) by Nuño Sempere - [GiveWell's GiveDirectly cost effectiveness analysis](https://observablehq.com/@hazelfire/givewells-givedirectly-cost-effectiveness-analysis) by Sam Nolan +- [List of QURI Squiggle Models](https://github.com/quantified-uncertainty/squiggle-models) by Nuño Sempere, Sam Nolan, and Ozzie Gooen - [Astronomical Waste](https://observablehq.com/@quinn-dougherty/waste) diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index eb796f77..9feb1d13 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -35,8 +35,7 @@ If both values are above zero, a `lognormal` distribution is used. If not, a `no - It's very easy to generate distributions with very long tails. If this - happens, you can click the "log x scale" box to view this using a log scale. + It's very easy to generate distributions with very long tails. These can be impossible to see without changing view settings. (These settings are available in the Playground, but not this smaller editor component) @@ -67,10 +66,10 @@ If both values are above zero, a `lognormal` distribution is used. If not, a `no ## Mixture -`mixture(...distributions: Distribution[], weights?: number[])` -`mx(...distributions: Distribution[], weights?: number[])` -`mixture(distributions: Distributions[], weights?: number[])` -`mx(distributions: Distributions[], weights?: number[])` +`mixture(...distributions: Distribution[], weights?: number[])` +`mx(...distributions: Distribution[], weights?: number[])` +`mixture(distributions: Distributions[], weights?: number[])` +`mx(distributions: Distributions[], weights?: number[])` The `mixture` mixes combines multiple distributions to create a mixture. You can optionally pass in a list of proportional weights. @@ -110,6 +109,11 @@ The `mixture` mixes combines multiple distributions to create a mixture. You can

In this case, I have a 20% chance of spending 0 time with it. I might estimate my hours with,

+ +

+ There's a temporary bug where the below render is compressed. If you toggle the code it will fix render correctly. +

+
- - + + @@ -280,10 +284,10 @@ Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) w - + @@ -343,7 +347,7 @@ Creates a [triangular distribution](https://en.wikipedia.org/wiki/Triangular_dis -## FromList +## SampleSet.fromList `SampleSet.fromList(samples:number[])` @@ -367,3 +371,37 @@ Creates a sample set distribution using an array of samples. specificity.

+ +## PointSet.makeContinuous + +`PointSet.makeContinuous(points:{x: number, y: number})` + +Creates a continuous point set distribution using a list of points. + + + +### Arguments + +- `points`: An array of at least 3 coordinates. + +## PointSet.makeDiscrete + +`PointSet.makeDiscrete(points:{x: number, y: number})` + +Creates a discrete point set distribution using a list of points. + + + +### Arguments + +- `points`: An array of at least 1 coordinate. \ No newline at end of file diff --git a/packages/website/docs/Guides/Functions.mdx b/packages/website/docs/Guides/Functions.mdx index 4a4bc170..4e57f23e 100644 --- a/packages/website/docs/Guides/Functions.mdx +++ b/packages/website/docs/Guides/Functions.mdx @@ -181,7 +181,7 @@ The `sample(distribution)` samples a given distribution. Recall the [three formats of distributions](https://develop--squiggle-documentation.netlify.app/docs/Discussions/Three-Types-Of-Distributions). We can force any distribution into `SampleSet` format - + Or `PointSet` format diff --git a/packages/website/docs/Overview.mdx b/packages/website/docs/Overview.mdx index 528e1a88..a620c9a8 100644 --- a/packages/website/docs/Overview.mdx +++ b/packages/website/docs/Overview.mdx @@ -64,14 +64,17 @@ You can currently interact with Squiggle in a few ways: **[Playground](/playground)** The [Squiggle Playground](/playground) is a nice tool for working with small models and making prototypes. You can make simple sharable links, but you can't save models that change over time. +**[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** +There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. + **[Typescript Library](https://www.npmjs.com/package/@quri/squiggle-lang)** Squiggle is built using [Rescript](https://rescript-lang.org/), and is accessible via a simple Typescript library. You can use this library to either run Squiggle code in full, or to call select specific functions within Squiggle (though this latter functionality is very minimal). **[React Components Library](https://www.npmjs.com/package/@quri/squiggle-components)** All of the components used in the playground and documentation are available in a separate component NPM repo. You can see the full Storybook of components [here](https://squiggle-components.netlify.app). -**[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** -There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. +**[Observable](https://observablehq.com/@hazelfire/squiggle)** +You can use Squiggle Components in Observable notebooks. Sam Nolan put together an exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly important and use in your Observable notebooks. ## Squiggle Vs. Other Tools @@ -106,14 +109,4 @@ There's a simple [VS Code extension](https://marketplace.visualstudio.com/items? - Generally not as easy to use as Guesstimate or Causal, especially for non programmers. ## Organization -Squiggle is one of the main projects of [The Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). QURI is a nonprofit funded primarily by [Effective Altruist](https://www.effectivealtruism.org/) donors. - -## Get started - -- [Gallery](./Discussions/Gallery) -- [Squiggle playground](/playground) -- [Language basics](./Guides/Language) -- [Squiggle functions source of truth](./Guides/Functions) -- [Known bugs](./Discussions/Bugs) -- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) -- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle) +Squiggle is one of the main projects of [The Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). QURI is a nonprofit funded primarily by [Effective Altruist](https://www.effectivealtruism.org/) donors. \ No newline at end of file From b37e372815252d952a67593f4dbcee19a55f7709 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 28 Jul 2022 17:00:06 -0700 Subject: [PATCH 06/13] Formatted --- packages/website/docs/Discussions/Bugs.mdx | 4 +- .../docs/Discussions/Future-Features.md | 2 +- .../docs/Guides/DistributionCreation.mdx | 25 +++++----- packages/website/docs/Guides/Language.mdx | 46 ++++++++++++------- packages/website/docs/Overview.mdx | 29 +++++++----- packages/website/src/pages/index.js | 12 ++--- 6 files changed, 71 insertions(+), 47 deletions(-) diff --git a/packages/website/docs/Discussions/Bugs.mdx b/packages/website/docs/Discussions/Bugs.mdx index e70e45b3..154ee2a0 100644 --- a/packages/website/docs/Discussions/Bugs.mdx +++ b/packages/website/docs/Discussions/Bugs.mdx @@ -9,7 +9,7 @@ Much of the Squiggle math is imprecise. This can cause significant errors, so wa Below are a few specific examples to watch for. We'll work on improving these over time and adding much better warnings and error management. -## Operations on very small or large numbers, silently round to 0 and 1 +## Operations on very small or large numbers, silently round to 0 and 1 Squiggle is poor at dealing with very small or large numbers, given fundamental limitations of floating point precision. See [this Github Issue](https://github.com/quantified-uncertainty/squiggle/issues/834). @@ -38,4 +38,4 @@ The means of sample set distributions can vary dramatically, especially as the n defaultCode={`symbolicDist = 5 to 50333333 sampleSetDist = SampleSet.fromDist(symbolicDist) [mean(symbolicDist), mean(sampleSetDist), symbolicDist, sampleSetDist]`} -/> \ No newline at end of file +/> diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index 3ad0e455..cf6c34d8 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -51,4 +51,4 @@ It might be useful to allow people to annotate functions and variables with long Right now, Monte Carlo simulations are totally random. It would be nicer to be able to enter a seed somehow in order to control the randomness. Or, with the same seed, the function should always return the same values. This would make debugging and similar easier. **Caching/Memoization** -There are many performance improvements that Squiggle could have. We'll get to some of them eventually. \ No newline at end of file +There are many performance improvements that Squiggle could have. We'll get to some of them eventually. diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 9feb1d13..b5bfdd11 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -35,7 +35,9 @@ If both values are above zero, a `lognormal` distribution is used. If not, a `no - It's very easy to generate distributions with very long tails. These can be impossible to see without changing view settings. (These settings are available in the Playground, but not this smaller editor component) + It's very easy to generate distributions with very long tails. These can be + impossible to see without changing view settings. (These settings are + available in the Playground, but not this smaller editor component) @@ -69,7 +71,7 @@ If both values are above zero, a `lognormal` distribution is used. If not, a `no `mixture(...distributions: Distribution[], weights?: number[])` `mx(...distributions: Distribution[], weights?: number[])` `mixture(distributions: Distributions[], weights?: number[])` -`mx(distributions: Distributions[], weights?: number[])` +`mx(distributions: Distributions[], weights?: number[])` The `mixture` mixes combines multiple distributions to create a mixture. You can optionally pass in a list of proportional weights. @@ -283,10 +285,7 @@ Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) w - + @@ -378,12 +377,14 @@ Creates a sample set distribution using an array of samples. Creates a continuous point set distribution using a list of points. - +])`} +/> ### Arguments @@ -395,13 +396,15 @@ Creates a continuous point set distribution using a list of points. Creates a discrete point set distribution using a list of points. - +])`} +/> ### Arguments -- `points`: An array of at least 1 coordinate. \ No newline at end of file +- `points`: An array of at least 1 coordinate. diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index 71f7e888..311ef6ba 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -12,6 +12,7 @@ Squiggle supports some simple types and language features. ## Distributions + There are several ways of easily entering distributions. See the [documentation](/docs/Api/Dist/) on distributions for a complete API. ## Lists + Squiggle lists can accept items of any type, similar to those in Python. [API](/docs/Api/List). ## Dictionaries + Squiggle dictionaries work similarly to Python dictionaries. [API](/docs/Api/Dictionary). +`} +/> ## Pipes Squiggle features [data-first](https://www.javierchavarri.com/data-first-and-data-last-a-comparison/) pipes. Functions in the standard library are organized to make this convenient. - truncateLeft(3) |> SampleSet.fromDist |> SampleSet.map({|r| r + 10})`} /> + + truncateLeft(3) |> SampleSet.fromDist |> SampleSet.map({|r| r + 10})`} +/> ## Standard Library @@ -70,24 +78,30 @@ Squiggle features a simple [standard libary](/docs/Api/Dist). Most functions are namespaced under their respective types to keep functionality distinct. Certain popular functions are usable without their namespaces. For example, - SampleSet.fromList // namespaces required + + SampleSet.fromList // namespaces required b = normal(5,2) // namespace not required c = 5 to 10 // namespace not required -""`} /> +""`} +/> ## Number Prefixes + Numbers support a few scientific notation prefixes. -| prefix | multiplier | -|-----|-------| -| n | 10^-9 | -| m | 10^-3 | -| k | 10^3 | -| M | 10^6 | -| B,G | 10^9 | -| T | 10^12 | -| P | 10^15 | +| prefix | multiplier | +| ------ | ---------- | +| n | 10^-9 | +| m | 10^-3 | +| k | 10^3 | +| M | 10^6 | +| B,G | 10^9 | +| T | 10^12 | +| P | 10^15 | - +distribution`} +/> diff --git a/packages/website/docs/Overview.mdx b/packages/website/docs/Overview.mdx index a620c9a8..9e314211 100644 --- a/packages/website/docs/Overview.mdx +++ b/packages/website/docs/Overview.mdx @@ -10,10 +10,12 @@ Squiggle is a minimalist programming language for probabilistic estimation. It's The basics of Squiggle are fairly straightforward. This can be enough for many models. The more advanced functionality can take some time to learn. ## Simple example + Say you're trying to estimate the number of piano tuners in New York City. You can build a simple model of this, like so. (Tip: This is interactive! Feel free to modify the code directly.) - +`} +/> ---- +--- Now let's take this a bit further. Let's imagine that you think that NYC will grow over time, and you'd like to estimate the number of piano tuners for every point in time for the next few years. - +}`} +/> If you haven't noticed yet, you can hover over the `populationAtTime` graph to see the distribution of population at different points in time. - - ## Using Squiggle + You can currently interact with Squiggle in a few ways: **[Playground](/playground)** @@ -68,7 +72,7 @@ The [Squiggle Playground](/playground) is a nice tool for working with small mod There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. **[Typescript Library](https://www.npmjs.com/package/@quri/squiggle-lang)** -Squiggle is built using [Rescript](https://rescript-lang.org/), and is accessible via a simple Typescript library. You can use this library to either run Squiggle code in full, or to call select specific functions within Squiggle (though this latter functionality is very minimal). +Squiggle is built using [Rescript](https://rescript-lang.org/), and is accessible via a simple Typescript library. You can use this library to either run Squiggle code in full, or to call select specific functions within Squiggle (though this latter functionality is very minimal). **[React Components Library](https://www.npmjs.com/package/@quri/squiggle-components)** All of the components used in the playground and documentation are available in a separate component NPM repo. You can see the full Storybook of components [here](https://squiggle-components.netlify.app). @@ -93,13 +97,15 @@ You can use Squiggle Components in Observable notebooks. Sam Nolan put together - A visually-driven tool. (See [Guesstimate](https://www.getguesstimate.com/) and [Causal](https://causal.app/)) ### Strengths + - Simple and readable syntax, especially for dealing with probabilistic math. - Fast for relatively small models. Strong for rapid prototyping. -- Optimized for using some numeric and symbolic approaches, not just Monte Carlo. +- Optimized for using some numeric and symbolic approaches, not just Monte Carlo. - Embeddable in Javascript. - Free and open-source. -### Weaknesses +### Weaknesses + - Limited scientific capabilities. - Much slower than serious probabilistic programming languages on sizeable models. - Can't do Bayesian backwards inference. @@ -109,4 +115,5 @@ You can use Squiggle Components in Observable notebooks. Sam Nolan put together - Generally not as easy to use as Guesstimate or Causal, especially for non programmers. ## Organization -Squiggle is one of the main projects of [The Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). QURI is a nonprofit funded primarily by [Effective Altruist](https://www.effectivealtruism.org/) donors. \ No newline at end of file + +Squiggle is one of the main projects of [The Quantified Uncertainty Research Institute](https://quantifieduncertainty.org/). QURI is a nonprofit funded primarily by [Effective Altruist](https://www.effectivealtruism.org/) donors. diff --git a/packages/website/src/pages/index.js b/packages/website/src/pages/index.js index fdfe3b45..b0c26514 100644 --- a/packages/website/src/pages/index.js +++ b/packages/website/src/pages/index.js @@ -10,12 +10,12 @@ function HomepageHeader() { return (
- {'Docusaurus + {"Docusaurus

{siteConfig.title}

Early Access

{siteConfig.tagline}

From 5576bf2ef361c39607776d076fa86f590f314013 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Fri, 29 Jul 2022 02:12:07 +0200 Subject: [PATCH 07/13] fixes #904. E.O.default performance --- .../src/rescript/Distributions/PointSetDist/Continuous.res | 2 +- .../src/rescript/Distributions/PointSetDist/Discrete.res | 3 ++- .../Distributions/PointSetDist/MixedShapeBuilder.res | 6 ++++-- .../ReducerInterface/ReducerInterface_ExternalLibrary.res | 2 +- packages/squiggle-lang/src/rescript/Utility/E.res | 6 ++++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res index 05d94ca9..2297a3e3 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res @@ -250,7 +250,7 @@ module T = Dist({ let downsample = (length, t): t => t |> shapeMap(XYShape.XsConversion.proportionByProbabilityMass(length, integral(t).xyShape)) - let integralEndY = (t: t) => t.integralSumCache |> E.O.default(t |> integral |> lastY) + let integralEndY = (t: t) => t.integralSumCache |> E.O.defaultFn(() => t |> integral |> lastY) let integralXtoY = (f, t: t) => t |> integral |> shapeFn(XYShape.XtoY.linear(f)) let integralYtoX = (f, t: t) => t |> integral |> shapeFn(XYShape.YtoX.linear(f)) let toContinuous = t => Some(t) diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res index 7e7c4981..b7d5ffd4 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res @@ -158,7 +158,8 @@ module T = Dist({ Continuous.make(~interpolation=#Stepwise, integralShape) } - let integralEndY = (t: t) => t.integralSumCache |> E.O.default(t |> integral |> Continuous.lastY) + let integralEndY = (t: t) => + t.integralSumCache |> E.O.defaultFn(() => t |> integral |> Continuous.lastY) let minX = shapeFn(XYShape.T.minX) let maxX = shapeFn(XYShape.T.maxX) let toDiscreteProbabilityMassFraction = _ => 1.0 diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/MixedShapeBuilder.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/MixedShapeBuilder.res index 89273283..f4407ba8 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/MixedShapeBuilder.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/MixedShapeBuilder.res @@ -13,9 +13,11 @@ let buildSimple = ( ~discrete: option, ): option => { let continuous = - continuous |> E.O.default(Continuous.make(~integralSumCache=Some(0.0), {xs: [], ys: []})) + continuous |> E.O.defaultFn(() => + Continuous.make(~integralSumCache=Some(0.0), {xs: [], ys: []}) + ) let discrete = - discrete |> E.O.default(Discrete.make(~integralSumCache=Some(0.0), {xs: [], ys: []})) + discrete |> E.O.defaultFn(() => Discrete.make(~integralSumCache=Some(0.0), {xs: [], ys: []})) let cLength = continuous |> Continuous.getShape |> XYShape.T.xs |> E.A.length let dLength = discrete |> Discrete.getShape |> XYShape.T.xs |> E.A.length switch (cLength, dLength) { diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res index fc0a2821..7ae6ace9 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res @@ -16,7 +16,7 @@ let dispatch = ( () => ReducerInterface_Duration.dispatch(call, environment), () => ReducerInterface_Number.dispatch(call, environment), () => FunctionRegistry_Library.dispatch(call, environment, reducer), - ])->E.O2.default(chain(call, environment, reducer)) + ])->E.O2.defaultFn(() => chain(call, environment, reducer)) } /* diff --git a/packages/squiggle-lang/src/rescript/Utility/E.res b/packages/squiggle-lang/src/rescript/Utility/E.res index 50a28382..22c8c525 100644 --- a/packages/squiggle-lang/src/rescript/Utility/E.res +++ b/packages/squiggle-lang/src/rescript/Utility/E.res @@ -82,6 +82,11 @@ module O = { | None => d | Some(a) => a } + let defaultFn = (d, o) => + switch o { + | None => d() + | Some(a) => a + } let isSome = o => switch o { | Some(_) => true @@ -158,6 +163,7 @@ module O = { module O2 = { let default = (a, b) => O.default(b, a) + let defaultFn = (a, b) => O.defaultFn(b, a) let toExn = (a, b) => O.toExn(b, a) let fmap = (a, b) => O.fmap(b, a) let toResult = (a, b) => O.toResult(b, a) From a5adcdbeb61cf915307ecf8c5e8a6ecabbc6d860 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 28 Jul 2022 17:32:25 -0700 Subject: [PATCH 08/13] Changed FunctionChart1Number to use regular count of operations, was slow for many functions --- packages/components/src/components/FunctionChart1Number.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/components/src/components/FunctionChart1Number.tsx b/packages/components/src/components/FunctionChart1Number.tsx index 12d00b94..7af17c42 100644 --- a/packages/components/src/components/FunctionChart1Number.tsx +++ b/packages/components/src/components/FunctionChart1Number.tsx @@ -39,13 +39,10 @@ interface FunctionChart1NumberProps { type point = { x: number; value: result }; let getFunctionImage = ({ chartSettings, fn, environment }) => { - //We adjust the count, because the count is made for distributions, which are much more expensive to estimate - let adjustedCount = chartSettings.count * 20; - let chartPointsToRender = _rangeByCount( chartSettings.start, chartSettings.stop, - adjustedCount + chartSettings.count ); let chartPointsData: point[] = chartPointsToRender.map((x) => { From a23b2e37099e1845fbe27aea05592ca28121ab4f Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 28 Jul 2022 18:12:25 -0700 Subject: [PATCH 09/13] Minor text fix --- packages/website/docs/Overview.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/docs/Overview.mdx b/packages/website/docs/Overview.mdx index 9e314211..d00ef749 100644 --- a/packages/website/docs/Overview.mdx +++ b/packages/website/docs/Overview.mdx @@ -66,7 +66,7 @@ If you haven't noticed yet, you can hover over the `populationAtTime` graph to s You can currently interact with Squiggle in a few ways: **[Playground](/playground)** -The [Squiggle Playground](/playground) is a nice tool for working with small models and making prototypes. You can make simple sharable links, but you can't save models that change over time. +The [Squiggle Playground](/playground) is a nice tool for working with small models and making prototypes. You can make simple shareable links, but you can't save models that change over time. **[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)** There's a simple [VS Code extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) for running and visualizing Squiggle code. We find that VS Code is a useful editor for managing larger Squiggle setups. @@ -78,7 +78,7 @@ Squiggle is built using [Rescript](https://rescript-lang.org/), and is accessibl All of the components used in the playground and documentation are available in a separate component NPM repo. You can see the full Storybook of components [here](https://squiggle-components.netlify.app). **[Observable](https://observablehq.com/@hazelfire/squiggle)** -You can use Squiggle Components in Observable notebooks. Sam Nolan put together an exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly important and use in your Observable notebooks. +You can use Squiggle Components in Observable notebooks. Sam Nolan put together an exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in your Observable notebooks. ## Squiggle Vs. Other Tools From 9096ee70511a8ba66ccc8017e472b3cb9d0f1b28 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 29 Jul 2022 08:07:11 -0700 Subject: [PATCH 10/13] More small modifications --- .../{DistSampleSet.md => DistSampleSet.mdx} | 3 ++ packages/website/docs/Api/List.md | 9 ++++- .../docs/Discussions/Future-Features.md | 6 ++-- packages/website/docs/Discussions/Gallery.md | 9 ++--- .../Three-Formats-Of-Distributions.md | 26 +++++++------- packages/website/docs/Guides/Gotchas.mdx | 34 +++++++++++++++++++ packages/website/docs/Integrations.md | 29 ++++++++++++++++ packages/website/docs/Node-Packages.md | 24 ------------- packages/website/sidebars.js | 4 +-- 9 files changed, 97 insertions(+), 47 deletions(-) rename packages/website/docs/Api/{DistSampleSet.md => DistSampleSet.mdx} (92%) create mode 100644 packages/website/docs/Guides/Gotchas.mdx create mode 100644 packages/website/docs/Integrations.md delete mode 100644 packages/website/docs/Node-Packages.md diff --git a/packages/website/docs/Api/DistSampleSet.md b/packages/website/docs/Api/DistSampleSet.mdx similarity index 92% rename from packages/website/docs/Api/DistSampleSet.md rename to packages/website/docs/Api/DistSampleSet.mdx index eaed6942..168ee397 100644 --- a/packages/website/docs/Api/DistSampleSet.md +++ b/packages/website/docs/Api/DistSampleSet.mdx @@ -3,6 +3,9 @@ sidebar_position: 5 title: Sample Set Distribution --- +import { SquiggleEditor } from "../../src/components/SquiggleEditor"; +import Admonition from "@theme/Admonition"; + Sample set distributions are one of the three distribution formats. Internally, they are stored as a list of numbers. It's useful to distinguish point set distributions from arbitrary lists of numbers to make it clear which functions are applicable. Monte Carlo calculations typically result in sample set distributions. diff --git a/packages/website/docs/Api/List.md b/packages/website/docs/Api/List.md index 1a8ef7a8..26c7c555 100644 --- a/packages/website/docs/Api/List.md +++ b/packages/website/docs/Api/List.md @@ -73,6 +73,13 @@ map: (list<'a>, a => b) => list<'b> See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/belt/array#map). +### filter + +``` +filter: (list<'a>, 'a => bool) => list<'a> +``` +See [Rescript implementation of keep](https://rescript-lang.org/docs/manual/latest/api/belt/array#keep), which is functionally equivalent. + ### reduce ``` @@ -97,4 +104,4 @@ reduceReverse: (list<'b>, 'a, ('a, 'b) => 'a) => 'a Works like `reduce`, but the function is applied to each item from the last back to the first. -See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/belt/array#reducereverse). +See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/belt/array#reducereverse). \ No newline at end of file diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index cf6c34d8..0c333641 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -41,14 +41,14 @@ This interface should also be able to handle changing Squiggle values. This is b **Importance & quality scores** Workflows/functionality to declare the importance and coveredness of each part of the paramater space. For example, some subsets of the paramater space of a function might be much more important to get right than others. Similarly, the analyst might be much more certain about some parts than others. Ideally. they could decline sections. -**Static / Sensitivity Analysis** +**Static / sensitivity analysis** Guesstimate has Sensitivity analysis that's pretty useful. This could be quite feasible to add, though it will likely require some thinking. **Annotation** It might be useful to allow people to annotate functions and variables with longer descriptions, maybe Markdown. This could very much help interpretation/analysis of these items. -**Randomness Seeds** +**Randomness seeds** Right now, Monte Carlo simulations are totally random. It would be nicer to be able to enter a seed somehow in order to control the randomness. Or, with the same seed, the function should always return the same values. This would make debugging and similar easier. -**Caching/Memoization** +**Caching/memoization** There are many performance improvements that Squiggle could have. We'll get to some of them eventually. diff --git a/packages/website/docs/Discussions/Gallery.md b/packages/website/docs/Discussions/Gallery.md index c9498ca0..ad06b550 100644 --- a/packages/website/docs/Discussions/Gallery.md +++ b/packages/website/docs/Discussions/Gallery.md @@ -3,7 +3,8 @@ sidebar_position: 2 title: Gallery --- -- [Adjusting probabilities for the passage of time](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3/p/j8o6sgRerE3tqNWdj) by Nuño Sempere -- [GiveWell's GiveDirectly cost effectiveness analysis](https://observablehq.com/@hazelfire/givewells-givedirectly-cost-effectiveness-analysis) by Sam Nolan -- [List of QURI Squiggle Models](https://github.com/quantified-uncertainty/squiggle-models) by Nuño Sempere, Sam Nolan, and Ozzie Gooen -- [Astronomical Waste](https://observablehq.com/@quinn-dougherty/waste) +* [GiveWell's GiveDirectly cost effectiveness analysis](https://observablehq.com/@hazelfire/givewells-givedirectly-cost-effectiveness-analysis) by Sam Nolan +* [A Critical Review of Open Philanthropy’s Bet On Criminal Justice Reform](https://forum.effectivealtruism.org/posts/h2N9qEbvQ6RHABcae/a-critical-review-of-open-philanthropy-s-bet-on-criminal) by Nuño Sempere +* [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.effectivealtruism.org/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022) by Nuño Sempere, Misha Yagudin, Eli Lifland +* [Adjusting probabilities for the passage of time](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3/p/j8o6sgRerE3tqNWdj) by Nuño Sempere +* [List of QURI Squiggle Models](https://github.com/quantified-uncertainty/squiggle-models) by Nuño Sempere, Sam Nolan, and Ozzie Gooen \ No newline at end of file diff --git a/packages/website/docs/Discussions/Three-Formats-Of-Distributions.md b/packages/website/docs/Discussions/Three-Formats-Of-Distributions.md index e844f6c6..13379146 100644 --- a/packages/website/docs/Discussions/Three-Formats-Of-Distributions.md +++ b/packages/website/docs/Discussions/Three-Formats-Of-Distributions.md @@ -5,17 +5,17 @@ author: Ozzie Gooen date: 02-19-2022 --- -Probability distributions have several subtle possible formats. Three important ones that we deal with in Squiggle are symbolic, sample set, and graph formats. +Probability distributions have several subtle possible formats. Three important ones that we deal with in Squiggle are symbolic, sample set, and point set formats. _Symbolic_ formats are just the math equations. `normal(5,3)` is the symbolic representation of a normal distribution. When you sample distributions (usually starting with symbolic formats), you get lists of samples. Monte Carlo techniques return lists of samples. Let’s call this the “_Sample Set_” format. -Lastly is what I’ll refer to as the _Graph_ format. It describes the coordinates, or the shape, of the distribution. You can save these formats in JSON, for instance, like, `{xs: [1, 2, 3, 4, …], ys: [.0001, .0003, .002, …]}`. +Lastly is what I’ll refer to as the _Point Set_ format. It describes the coordinates, or the shape, of the distribution. You can save these formats in JSON, for instance, like, `{xs: [1, 2, 3, 4, …], ys: [.0001, .0003, .002, …]}`. -Symbolic, Sample Set, and Graph formats all have very different advantages and disadvantages. +Symbolic, Sample Set, and Point Set formats all have very different advantages and disadvantages. -Note that the name "Symbolic" is fairly standard, but I haven't found common names for what I'm referring to as "Sample Set" and "Graph" formats. The formats aren't often specifically referred to for these purposes, from what I can tell. +Note that the name "Symbolic" is fairly standard, but I haven't found common names for what I'm referring to as "Sample Set" and "Point Set" formats. The formats aren't often specifically referred to for these purposes, from what I can tell. ## Symbolic Formats @@ -40,7 +40,7 @@ To perform calculations of symbolic systems, you need to find analytical solutio - It’s often either impossible or computationally infeasible to find analytical solutions to most symbolic equations. - Solving symbolic equations requires very specialized tooling that’s very rare. There are a few small symbolic solver libraries out there, but not many. Wolfram Research is the main group that seems very strong here, and their work is mostly closed source + expensive. -**Converting to Graph Formats** +**Converting to Point Set Formats** - Very easy. Choose X points such that you capture most of the distribution (you can set a threshold, like 99.9%). For each X point, calculate the pdf, and save as the Y points. @@ -49,23 +49,23 @@ To perform calculations of symbolic systems, you need to find analytical solutio - Very easy. Just sample a bunch of times. The regular way is to randomly sample (This is trivial to do for all distributions with inverse-cdf functions.) If you want to get more fancy, you could provide extra samples from the tails, that would be weighted lower. Or, you could take samples in equal distances (of probability mass) along the entire distribution, then optionally shuffle it. (In the latter case, these would not be random samples, but sometimes that’s fine.) **How to Visualize** -Convert to graph, then display that. (Optionally, you can also convert to samples, then display those using a histogram, but this is often worse you have both options.) +Convert to point set, then display that. (Optionally, you can also convert to samples, then display those using a histogram, but this is often worse you have both options.) **Bonus: The Metalog Distribution** The Metalog distribution seems like it can represent almost any reasonable distribution. It’s symbolic. This is great for storage, but it’s not clear if it helps with calculation. My impression is that we don’t have symbolic ways of doing most functions (addition, multiplication, etc) on metalog distributions. Also, note that it can take a fair bit of computation to fit a shape to the Metalog distribution. -## Graph Formats +## Point Set Formats **TL;DR** -Lists of the x-y coordinates of the shape of a distribution. (Usually the pdf, which is more compressed than the cdf). Some key functions (like pdf, cdf) and manipulations can work on almost any graphically-described distribution. +Lists of the x-y coordinates of the shape of a distribution. (Usually the pdf, which is more compressed than the cdf). Some key functions (like pdf, cdf) and manipulations can work on almost any point set distribution. **Alternative Names:** Grid, Mesh, Graph, Vector, Pdf, PdfCoords/PdfPoints, Discretised, Bezier, Curve See [this facebook thread](https://www.facebook.com/ozzie.gooen/posts/10165936265785363?notif_id=1644937423623638¬if_t=feedback_reaction_generic&ref=notif). **How to Do Computation** -Use graph techniques. These can be fairly computationally-intensive (particularly finding integrals, which take a whole lot of adding). In the case that you want to multiply independent distributions, you can try convolution, but it’s pretty expensive. +Use point set techniques. These can be fairly computationally-intensive (particularly finding integrals, which take a whole lot of adding). In the case that you want to multiply independent distributions, you can try convolution, but it’s pretty expensive. **Examples** `{xs: [1, 2, 3, 4…], ys: [.0001, .0003, .002, .04, ...]} ` @@ -74,18 +74,18 @@ Use graph techniques. These can be fairly computationally-intensive (particularl **Advantages** - Much more compressed than Sample List formats, but much less compressed than Symbolic formats. -- Many functions (pdf, cdf, percentiles, mean, integration, etc) and manipulations (truncation, scaling horizontally or vertically), are possible on essentially all graph distributions. +- Many functions (pdf, cdf, percentiles, mean, integration, etc) and manipulations (truncation, scaling horizontally or vertically), are possible on essentially all point set distributions. **Disadvantages** -- Most calculations are infeasible/impossible to perform graphically. In these cases, you need to use sampling. +- Most calculations are infeasible/impossible to perform using point sets formats. In these cases, you need to use sampling. - Not as accurate or fast as symbolic methods, where the symbolic methods are applicable. -- The tails get cut off, which is subideal. It’s assumed that the value of the pdf outside of the bounded range is exactly 0, which is not correct. (Note: If you have ideas on how to store graph formats that don’t cut off tails, let me know) +- The tails get cut off, which is subideal. It’s assumed that the value of the pdf outside of the bounded range is exactly 0, which is not correct. (Note: If you have ideas on how to store point set formats that don’t cut off tails, let me know) **Converting to Symbolic Formats** - Okay, if you are okay with a Metalog approximation or similar. Metaculus uses an additive combination of up to [Logistic distributions](https://www.metaculus.com/help/faq/); you could also fit this. Fitting takes a little time (it requires several attempts and some optimization), can be arbitrarily accurate. -- If you want to be very fancy, you could try to fit graph distributions into normal / lognormal / etc. but this seems like a lot of work for little gain. +- If you want to be very fancy, you could try to fit point set distributions into normal / lognormal / etc. but this seems like a lot of work for little gain. **Converting to Sample List Formats** diff --git a/packages/website/docs/Guides/Gotchas.mdx b/packages/website/docs/Guides/Gotchas.mdx new file mode 100644 index 00000000..f4034aaa --- /dev/null +++ b/packages/website/docs/Guides/Gotchas.mdx @@ -0,0 +1,34 @@ +--- +title: Gotchas +sidebar_position: 8 +--- + +import { SquiggleEditor } from "../../src/components/SquiggleEditor"; +import Admonition from "@theme/Admonition"; + +## Point Set Distributions Conversions +Point Set conversions are done with [kernel density estimation](https://en.wikipedia.org/wiki/Kernel_density_estimation), which is lossy. This might be particularly noticeable in cases where distributions should be entirely above zero. + +In this example, we see that the median of this (highly skewed) distribution is positive when it's in a Sample Set format, but negative when it's converted to a Point Set format. + + + +--- +This can be particularly confusing for visualizations. Visualizations automatically convert distributions into Point Set formats. Therefore, they might often show negative values, even if the underlying distribution is fully positive. + +We plan to later support more configuration of kernel density estimation, and for visualiations of Sample Set distributions to instead use histograms. + +## Sample Set Correlations +Correlations with Sample Set distributions are a bit complicated. Monte Carlo generations with Squiggle are ordered. The first sample in one Sample Set distribution will correspond to the first sample in a distribution that comes from a resulting Monte Carlo generation. Therefore, Sample Set distributions in a chain of Monte Carlo generations are likely to all be correlated with each other. This connection breaks if any node changes to the Point Set or Symbolic format. + +In this example, we subtract all three types of distributions by themselves. Notice that the Sample Set distribution returns 1. The other two return the result of subtracting one normal distribution from a separate uncorrelated distribution. These results are clearly very different to each other. + + SampleSet.fromDist +sampleSetDistToPointSet = sampleSetDist |> PointSet.fromDist +symbolicDist = normal(5,2) +[sampleSetDist-sampleSetDist, sampleSetDistToPointSet-sampleSetDistToPointSet, symbolicDist-symbolicDist]`} /> \ No newline at end of file diff --git a/packages/website/docs/Integrations.md b/packages/website/docs/Integrations.md new file mode 100644 index 00000000..2ec5b148 --- /dev/null +++ b/packages/website/docs/Integrations.md @@ -0,0 +1,29 @@ +--- +sidebar_position: 4 +title: "Integrations" +--- + +## Node Packages +There are two JavaScript packages currently available for Squiggle: + +- [`@quri/squiggle-lang`](https://www.npmjs.com/package/@quri/squiggle-lang) +- [`@quri/squiggle-components`](https://www.npmjs.com/package/@quri/squiggle-components) + +Types are available for both packages. + +## [Squiggle Language](https://www.npmjs.com/package/@quri/squiggle-lang) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-lang.svg) +[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/squiggle-lang#use-the-npm-package) + +## [Squiggle Components](https://www.npmjs.com/package/@quri/squiggle-components) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-components.svg) +[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/components#usage-in-a-react-project) + +This documentation uses `@quri/squiggle-components` frequently. + +We host [a storybook](https://squiggle-components.netlify.app/) with details +and usage of each of the components made available. + +## [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) ![npm version](https://vsmarketplacebadge.apphb.com/version/QURI.vscode-squiggle.svg) +This extention allows you to run and visualize Squiggle code. + +## [Observable Library](https://observablehq.com/@hazelfire/squiggle) +An exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in Observable notebooks. \ No newline at end of file diff --git a/packages/website/docs/Node-Packages.md b/packages/website/docs/Node-Packages.md deleted file mode 100644 index b405627a..00000000 --- a/packages/website/docs/Node-Packages.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -sidebar_position: 4 -title: Node Packages ---- - -There are two JavaScript packages currently available for Squiggle: - -- [`@quri/squiggle-lang`](https://www.npmjs.com/package/@quri/squiggle-lang) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-lang.svg) -- [`@quri/squiggle-components`](https://www.npmjs.com/package/@quri/squiggle-components) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-components.svg) - -Types are available for both packages. - -## Squiggle Language - -[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/squiggle-lang#use-the-npm-package) - -## Squiggle Components - -[_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/components#usage-in-a-react-project) - -This documentation uses `@quri/squiggle-components` frequently. - -We host [a storybook](https://squiggle-components.netlify.app/) with details -and usage of each of the components made available. diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index 5c33d56c..85c644a4 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -28,8 +28,8 @@ const sidebars = { }, { type: "doc", - id: "Node-Packages", - label: "Node Packages", + id: "Integrations", + label: "Integrations", }, { type: "category", From 209ecafb22b18e5e2a1d7fbdd35397f2bc47ed04 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 29 Jul 2022 10:25:27 -0700 Subject: [PATCH 11/13] Updating to version 0.3.0 --- .../src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res index 55d1e5b7..91e9959c 100644 --- a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res +++ b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res @@ -2,7 +2,7 @@ module Bindings = Reducer_Bindings let bindings: Bindings.t = [ - ("System.version", ReducerInterface_InternalExpressionValue.IEvString("0.2.12")), + ("System.version", ReducerInterface_InternalExpressionValue.IEvString("0.3.0")), ]->Bindings.fromArray let makeBindings = (previousBindings: Bindings.t): Bindings.t => From fa1ec55e754f4dfbed1de732ddd0740723d8d0f6 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 29 Jul 2022 10:25:38 -0700 Subject: [PATCH 12/13] Minor fix --- packages/website/docs/Api/DistSampleSet.mdx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/website/docs/Api/DistSampleSet.mdx b/packages/website/docs/Api/DistSampleSet.mdx index 168ee397..eaed6942 100644 --- a/packages/website/docs/Api/DistSampleSet.mdx +++ b/packages/website/docs/Api/DistSampleSet.mdx @@ -3,9 +3,6 @@ sidebar_position: 5 title: Sample Set Distribution --- -import { SquiggleEditor } from "../../src/components/SquiggleEditor"; -import Admonition from "@theme/Admonition"; - Sample set distributions are one of the three distribution formats. Internally, they are stored as a list of numbers. It's useful to distinguish point set distributions from arbitrary lists of numbers to make it clear which functions are applicable. Monte Carlo calculations typically result in sample set distributions. From c4bc4a2832989e80ebae90c372a0bab529732e55 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Fri, 29 Jul 2022 10:26:14 -0700 Subject: [PATCH 13/13] Formatting --- packages/website/docs/Api/List.md | 3 ++- packages/website/docs/Discussions/Gallery.md | 10 +++++----- packages/website/docs/Guides/Gotchas.mdx | 15 +++++++++++---- packages/website/docs/Integrations.md | 15 ++++++++++----- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/packages/website/docs/Api/List.md b/packages/website/docs/Api/List.md index 26c7c555..137cdf5e 100644 --- a/packages/website/docs/Api/List.md +++ b/packages/website/docs/Api/List.md @@ -78,6 +78,7 @@ See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/b ``` filter: (list<'a>, 'a => bool) => list<'a> ``` + See [Rescript implementation of keep](https://rescript-lang.org/docs/manual/latest/api/belt/array#keep), which is functionally equivalent. ### reduce @@ -104,4 +105,4 @@ reduceReverse: (list<'b>, 'a, ('a, 'b) => 'a) => 'a Works like `reduce`, but the function is applied to each item from the last back to the first. -See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/belt/array#reducereverse). \ No newline at end of file +See [Rescript implementation](https://rescript-lang.org/docs/manual/latest/api/belt/array#reducereverse). diff --git a/packages/website/docs/Discussions/Gallery.md b/packages/website/docs/Discussions/Gallery.md index ad06b550..be7f143b 100644 --- a/packages/website/docs/Discussions/Gallery.md +++ b/packages/website/docs/Discussions/Gallery.md @@ -3,8 +3,8 @@ sidebar_position: 2 title: Gallery --- -* [GiveWell's GiveDirectly cost effectiveness analysis](https://observablehq.com/@hazelfire/givewells-givedirectly-cost-effectiveness-analysis) by Sam Nolan -* [A Critical Review of Open Philanthropy’s Bet On Criminal Justice Reform](https://forum.effectivealtruism.org/posts/h2N9qEbvQ6RHABcae/a-critical-review-of-open-philanthropy-s-bet-on-criminal) by Nuño Sempere -* [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.effectivealtruism.org/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022) by Nuño Sempere, Misha Yagudin, Eli Lifland -* [Adjusting probabilities for the passage of time](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3/p/j8o6sgRerE3tqNWdj) by Nuño Sempere -* [List of QURI Squiggle Models](https://github.com/quantified-uncertainty/squiggle-models) by Nuño Sempere, Sam Nolan, and Ozzie Gooen \ No newline at end of file +- [GiveWell's GiveDirectly cost effectiveness analysis](https://observablehq.com/@hazelfire/givewells-givedirectly-cost-effectiveness-analysis) by Sam Nolan +- [A Critical Review of Open Philanthropy’s Bet On Criminal Justice Reform](https://forum.effectivealtruism.org/posts/h2N9qEbvQ6RHABcae/a-critical-review-of-open-philanthropy-s-bet-on-criminal) by Nuño Sempere +- [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.effectivealtruism.org/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022) by Nuño Sempere, Misha Yagudin, Eli Lifland +- [Adjusting probabilities for the passage of time](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3/p/j8o6sgRerE3tqNWdj) by Nuño Sempere +- [List of QURI Squiggle Models](https://github.com/quantified-uncertainty/squiggle-models) by Nuño Sempere, Sam Nolan, and Ozzie Gooen diff --git a/packages/website/docs/Guides/Gotchas.mdx b/packages/website/docs/Guides/Gotchas.mdx index f4034aaa..2c7f5b0f 100644 --- a/packages/website/docs/Guides/Gotchas.mdx +++ b/packages/website/docs/Guides/Gotchas.mdx @@ -7,28 +7,35 @@ import { SquiggleEditor } from "../../src/components/SquiggleEditor"; import Admonition from "@theme/Admonition"; ## Point Set Distributions Conversions + Point Set conversions are done with [kernel density estimation](https://en.wikipedia.org/wiki/Kernel_density_estimation), which is lossy. This might be particularly noticeable in cases where distributions should be entirely above zero. In this example, we see that the median of this (highly skewed) distribution is positive when it's in a Sample Set format, but negative when it's converted to a Point Set format. - +}`} +/> --- + This can be particularly confusing for visualizations. Visualizations automatically convert distributions into Point Set formats. Therefore, they might often show negative values, even if the underlying distribution is fully positive. We plan to later support more configuration of kernel density estimation, and for visualiations of Sample Set distributions to instead use histograms. ## Sample Set Correlations + Correlations with Sample Set distributions are a bit complicated. Monte Carlo generations with Squiggle are ordered. The first sample in one Sample Set distribution will correspond to the first sample in a distribution that comes from a resulting Monte Carlo generation. Therefore, Sample Set distributions in a chain of Monte Carlo generations are likely to all be correlated with each other. This connection breaks if any node changes to the Point Set or Symbolic format. In this example, we subtract all three types of distributions by themselves. Notice that the Sample Set distribution returns 1. The other two return the result of subtracting one normal distribution from a separate uncorrelated distribution. These results are clearly very different to each other. - SampleSet.fromDist + SampleSet.fromDist sampleSetDistToPointSet = sampleSetDist |> PointSet.fromDist symbolicDist = normal(5,2) -[sampleSetDist-sampleSetDist, sampleSetDistToPointSet-sampleSetDistToPointSet, symbolicDist-symbolicDist]`} /> \ No newline at end of file +[sampleSetDist-sampleSetDist, sampleSetDistToPointSet-sampleSetDistToPointSet, symbolicDist-symbolicDist]`} +/> diff --git a/packages/website/docs/Integrations.md b/packages/website/docs/Integrations.md index 2ec5b148..c2aa16e7 100644 --- a/packages/website/docs/Integrations.md +++ b/packages/website/docs/Integrations.md @@ -4,6 +4,7 @@ title: "Integrations" --- ## Node Packages + There are two JavaScript packages currently available for Squiggle: - [`@quri/squiggle-lang`](https://www.npmjs.com/package/@quri/squiggle-lang) @@ -11,10 +12,12 @@ There are two JavaScript packages currently available for Squiggle: Types are available for both packages. -## [Squiggle Language](https://www.npmjs.com/package/@quri/squiggle-lang) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-lang.svg) +## [Squiggle Language](https://www.npmjs.com/package/@quri/squiggle-lang) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-lang.svg) + [_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/squiggle-lang#use-the-npm-package) -## [Squiggle Components](https://www.npmjs.com/package/@quri/squiggle-components) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-components.svg) +## [Squiggle Components](https://www.npmjs.com/package/@quri/squiggle-components) ![npm version](https://badge.fury.io/js/@quri%2Fsquiggle-components.svg) + [_See `README.md` in Github_](https://github.com/quantified-uncertainty/squiggle/tree/develop/packages/components#usage-in-a-react-project) This documentation uses `@quri/squiggle-components` frequently. @@ -22,8 +25,10 @@ This documentation uses `@quri/squiggle-components` frequently. We host [a storybook](https://squiggle-components.netlify.app/) with details and usage of each of the components made available. -## [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) ![npm version](https://vsmarketplacebadge.apphb.com/version/QURI.vscode-squiggle.svg) -This extention allows you to run and visualize Squiggle code. +## [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) ![npm version](https://vsmarketplacebadge.apphb.com/version/QURI.vscode-squiggle.svg) + +This extention allows you to run and visualize Squiggle code. ## [Observable Library](https://observablehq.com/@hazelfire/squiggle) -An exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in Observable notebooks. \ No newline at end of file + +An exportable [Observable Notebook](https://observablehq.com/@hazelfire/squiggle) of the key components that you can directly import and use in Observable notebooks.