feat: rejiggle default number of samples.
This commit is contained in:
parent
b6addc7f05
commit
94119e0173
2
squiggle/node_modules/@quri/squiggle-lang/dist/src/rescript/MagicNumbers.bs.js
generated
vendored
2
squiggle/node_modules/@quri/squiggle-lang/dist/src/rescript/MagicNumbers.bs.js
generated
vendored
|
@ -14,7 +14,7 @@ var Epsilon = {
|
|||
};
|
||||
var Environment = {
|
||||
defaultXYPointLength: 1000,
|
||||
defaultSampleCount: 10000,
|
||||
defaultSampleCount: 1000000,
|
||||
sparklineLength: 20
|
||||
};
|
||||
var OpCost = {
|
||||
|
|
4
squiggle/node_modules/@quri/squiggle-lang/src/rescript/MagicNumbers.bs.js
generated
vendored
4
squiggle/node_modules/@quri/squiggle-lang/src/rescript/MagicNumbers.bs.js
generated
vendored
|
@ -19,8 +19,8 @@ var Epsilon = {
|
|||
};
|
||||
|
||||
var Environment = {
|
||||
defaultXYPointLength: 1000,
|
||||
defaultSampleCount: 10000,
|
||||
defaultXYPointLength: 1000000,
|
||||
defaultSampleCount: 1000000,
|
||||
sparklineLength: 20
|
||||
};
|
||||
|
||||
|
|
|
@ -5,9 +5,22 @@ p_a = 0.8
|
|||
p_b = 0.5
|
||||
p_c = p_a * p_b
|
||||
|
||||
result = mx([0, 1, 1 to 3, 2 to 10], [(1 - p_c), p_c/2, p_c/4, p_c/4 ])
|
||||
dist_0 = 0
|
||||
dist_1 = 1
|
||||
dist_some = SampleSet.fromDist(1 to 3)
|
||||
dist_many = SampleSet.fromDist(2 to 10)
|
||||
|
||||
dists = [dist_0, dist_1, dist_some, dist_many]
|
||||
weights = [(1 - p_c), p_c/2, p_c/4, p_c/4 ]
|
||||
|
||||
result = mixture(dists, weights)
|
||||
mean(result)
|
||||
|
||||
`
|
||||
|
||||
let output = run(squiggle_code)
|
||||
let output = run(squiggle_code, {
|
||||
defaultXYPointLength: 1000000,
|
||||
defaultSampleCount: 1000000,
|
||||
sparklineLength: 20,
|
||||
})
|
||||
console.log(output.result.value)
|
||||
|
|
|
@ -2,5 +2,13 @@ p_a = 0.8
|
|||
p_b = 0.5
|
||||
p_c = p_a * p_b
|
||||
|
||||
result = mx([0, 1, 1 to 3, 2 to 10], [(1 - p_c), p_c/2, p_c/4, p_c/4 ])
|
||||
mean(result)
|
||||
dist_0 = 0
|
||||
dist_1 = 1
|
||||
dist_some = SampleSet.fromDist(1 to 3)
|
||||
dist_many = SampleSet.fromDist(2 to 10)
|
||||
|
||||
dists = [dist_0, dist_1, dist_some, dist_many]
|
||||
weights = [(1 - p_c), p_c/2, p_c/4, p_c/4 ]
|
||||
|
||||
result = mixture(dists, weights)
|
||||
mean(result)
|
||||
|
|
Loading…
Reference in New Issue
Block a user