Added toPointSet and toSampleSet to functions reference

Value: [0.004 to 0.089]
This commit is contained in:
Quinn Dougherty 2022-04-27 11:50:24 -04:00
parent ba13e097ec
commit 9c29a7048a
2 changed files with 11 additions and 0 deletions

View File

@ -10,3 +10,4 @@ packages/squiggle-lang/lib
packages/squiggle-lang/.nyc_output/
packages/squiggle-lang/coverage/
packages/squiggle-lang/.cache/
packages/website/build/

View File

@ -305,6 +305,16 @@ The `sample(distribution)` samples a given distribution.
<SquiggleEditor initialSquiggleString="sample(normal(0, 10))" />
## Converting between distribution formats
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
<SquiggleEditor initialSquiggleString="toSampleSet(normal(5, 10))" />
Or `PointSet` format
<SquiggleEditor initialSquiggleString="toPointSet(normal(5, 10))" />
## Normalization
Some distribution operations (like horizontal shift) return an unnormalized distriibution.