Compare commits

..

2 Commits

Author SHA1 Message Date
1b8b6d23c4 readme tweaks 2023-07-24 00:44:40 +02:00
09601c8d46 add links to examples in readme 2023-07-24 00:43:53 +02:00
3 changed files with 9 additions and 25 deletions

View File

@ -21,13 +21,13 @@ A self-contained C99 library that provides a subset of [Squiggle](https://www.sq
You can follow some example usage in the examples/ folder You can follow some example usage in the examples/ folder
1. In the [1st example](examples/01_one_sample/example.c), we define a small model, and draw one sample from it 1. In the [1st example](examples/01_one_sample/example.c), we define a small model, and draw one sample from it
2. In the 2nd example, we define a small model, and return many samples 2. In the [2nd example](examples/02_many_samples/example.c), we define a small model, and return many samples
3. In the 3rd example, we use a gcc extension—nested functions—to rewrite the code from point 2. in a more linear way. 3. In the [3rd example](examples/03_gcc_nested_function/example.c), we use a gcc extension—nested functions—to rewrite the code from point 2. in a more linear way.
4. In the 4th example, we define some simple cdfs, and we draw samples from those cdfs. We see that this approach is slower than using the built-in samplers, e.g., the normal sampler. 4. In the [4th example](examples/04_sample_from_cdf_simple/example.c), we define some simple cdfs, and we draw samples from those cdfs. We see that this approach is slower than using the built-in samplers, e.g., the normal sampler.
5. In the 5th example, we define the cdf for the beta distribution, and we draw samples from it. 5. In the [5th example](examples/05_sample_from_cdf_beta/example.c), we define the cdf for the beta distribution, and we draw samples from it.
6. In the 6th example, we take samples from simple gamma and beta distributions, using the samplers provided by this library. 6. In the [6th example](examples/06_gamma_beta/example.c), we take samples from simple gamma and beta distributions, using the samplers provided by this library.
7. In the 7th example, we get the 90% confidence interval of a beta distribution 7. In the [7th example](examples/07_ci_beta/example.c), we get the 90% confidence interval of a beta distribution
8. The 8th example translates the models from Eli and Nuño from [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.nunosempere.com/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022#Nu_o_Sempere) into squiggle.c, then creates a mixture from both, and returns the mean probability of death per month and the 90% confidence interval. 8. The [8th example](examples/08_nuclear_war/example.c) translates the models from Eli and Nuño from [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.nunosempere.com/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022#Nu_o_Sempere) into squiggle.c, then creates a mixture from both, and returns the mean probability of death per month and the 90% confidence interval.
## Commentary ## Commentary
@ -258,11 +258,10 @@ Overall, I would caution that if you really care about the very far tails of dis
## To do list ## To do list
- [ ] Link to the examples in the examples section.
- [ ] Systematize references - [ ] Systematize references
- [ ] Publish online - [ ] Publish online
- [ ] Support all distribution functions in <https://www.squiggle-language.com/docs/Api/Dist> - [ ] Support all distribution functions in <https://www.squiggle-language.com/docs/Api/Dist>
- [ ] Support all distribution functions in <https://www.squiggle-language.com/docs/Api/Dist>, and do so efficiently - [ ] do so efficiently
## Done ## Done
@ -307,3 +306,4 @@ Overall, I would caution that if you really care about the very far tails of dis
- [x] Give warning about sampling-based methods. - [x] Give warning about sampling-based methods.
- [x] Have some more complicated & realistic example - [x] Have some more complicated & realistic example
- [x] Add summarization functions: 90% ci (or all c.i.?) - [x] Add summarization functions: 90% ci (or all c.i.?)
- [x] Link to the examples in the examples section.

View File

@ -41,11 +41,3 @@ int main(){
printf("result_one: %f\n", result_one); printf("result_one: %f\n", result_one);
free(seed); free(seed);
} }
/*
Aggregation mechanisms:
- Quantiles (requires a sort)
- Sum
- Average
- Std
*/

View File

@ -50,11 +50,3 @@ int main(){
printf("]\n"); printf("]\n");
free(seed); free(seed);
} }
/*
Aggregation mechanisms:
- Quantiles (requires a sort)
- Sum
- Average
- Std
*/