Added toPointSet
and toSampleSet
to functions reference
Value: [0.004 to 0.089]
This commit is contained in:
parent
ba13e097ec
commit
9c29a7048a
|
@ -10,3 +10,4 @@ packages/squiggle-lang/lib
|
|||
packages/squiggle-lang/.nyc_output/
|
||||
packages/squiggle-lang/coverage/
|
||||
packages/squiggle-lang/.cache/
|
||||
packages/website/build/
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user