Compare commits
	
		
			No commits in common. "1b8b6d23c4eafc8352be25271219f68250d5eeab" and "01770e4a914d15200f71a17e19c5964be11db9fe" have entirely different histories.
		
	
	
		
			1b8b6d23c4
			...
			01770e4a91
		
	
		
							
								
								
									
										18
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								README.md
									
									
									
									
									
								
							|  | @ -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 | ||||
| 
 | ||||
| 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](examples/02_many_samples/example.c), we define a small model, and return many samples | ||||
| 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](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](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](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](examples/07_ci_beta/example.c), we get the 90% confidence interval of a beta distribution | ||||
| 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. | ||||
| 2. In the 2nd example, 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. | ||||
| 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. | ||||
| 5. In the 5th example, 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. | ||||
| 7. In the 7th example, 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. | ||||
| 
 | ||||
| ## Commentary | ||||
| 
 | ||||
|  | @ -258,10 +258,11 @@ Overall, I would caution that if you really care about the very far tails of dis | |||
| 
 | ||||
| ## To do list | ||||
| 
 | ||||
| - [ ] Link to the examples in the examples section. | ||||
| - [ ] Systematize references | ||||
| - [ ] Publish online | ||||
| - [ ] Support all distribution functions in <https://www.squiggle-language.com/docs/Api/Dist> | ||||
|   - [ ] do so efficiently | ||||
| - [ ] Support all distribution functions in <https://www.squiggle-language.com/docs/Api/Dist>, and do so efficiently | ||||
| 
 | ||||
| ## Done | ||||
| 
 | ||||
|  | @ -306,4 +307,3 @@ Overall, I would caution that if you really care about the very far tails of dis | |||
| - [x] Give warning about sampling-based methods. | ||||
| - [x] Have some more complicated & realistic example | ||||
| - [x] Add summarization functions: 90% ci (or all c.i.?)  | ||||
| - [x] Link to the examples in the examples section. | ||||
|  |  | |||
|  | @ -41,3 +41,11 @@ int main(){ | |||
| 		printf("result_one: %f\n", result_one); | ||||
| 		free(seed); | ||||
| } | ||||
| 
 | ||||
| /* 
 | ||||
| Aggregation mechanisms: | ||||
| - Quantiles (requires a sort) | ||||
| - Sum  | ||||
| - Average | ||||
| - Std | ||||
| */ | ||||
|  |  | |||
|  | @ -50,3 +50,11 @@ int main(){ | |||
| 		printf("]\n"); | ||||
| 		free(seed); | ||||
| } | ||||
| 
 | ||||
| /* 
 | ||||
| Aggregation mechanisms: | ||||
| - Quantiles (requires a sort) | ||||
| - Sum  | ||||
| - Average | ||||
| - Std | ||||
| */ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user