Moved fromSamples
to Inventory
section
Value: [1e-7 to 1e-5]
This commit is contained in:
parent
e724f43b9d
commit
f3561317fd
|
@ -98,6 +98,19 @@ bound `a`, mode `b` and upper bound `c`.
|
|||
|
||||
Squiggle, when the context is right, automatically casts a float to a constant distribution.
|
||||
|
||||
## `fromSamples`
|
||||
|
||||
The last distribution constructor takes an array of samples and constructs a sample set distribution.
|
||||
|
||||
<SquiggleEditor initialSquiggleString="fromSamples([1,2,3,4,6,5,5,5])" />
|
||||
|
||||
#### Validity
|
||||
|
||||
For `fromSamples(xs)`,
|
||||
|
||||
- `xs.length > 5`
|
||||
- Strictly every element of `xs` must be a number.
|
||||
|
||||
## Operating on distributions
|
||||
|
||||
Here are the ways we combine distributions.
|
||||
|
@ -325,16 +338,6 @@ Above, we saw the unary `toSampleSet`, which uses an internal hardcoded number o
|
|||
|
||||
- Second argument to `toSampleSet` must be a number.
|
||||
|
||||
## `fromSamples`
|
||||
|
||||
<SquiggleEditor initialSquiggleString="fromSamples([1,2,3,4,6,5,5,5])" />
|
||||
#### Validity
|
||||
|
||||
For `fromSamples(xs)`,
|
||||
|
||||
- `xs.length > 5`
|
||||
- Strictly every element of `xs` must be a number.
|
||||
|
||||
## Normalization
|
||||
|
||||
Some distribution operations (like horizontal shift) return an unnormalized distriibution.
|
||||
|
|
Loading…
Reference in New Issue
Block a user