#closures #raw #original #complete #listing #samples #evidence

closure-core

CLOSURE: complete listing of original samples of underlying raw evidence

1 unstable release

new 0.1.0 Nov 16, 2024

#6 in #listing

Download history 81/week @ 2024-11-11

81 downloads per month

MIT/Apache

13KB
185 lines

CLOSURE: complete listing of original samples of underlying raw evidence

Implements the novel CLOSURE technique for efficiently reconstructing all possible distributions of raw data from summary statistics. It is not about the Rust feature called closure.

You will likely only need dfs_parallel().

Most of the code was written by Claude 3.5, translating Python code by Nathanael Larigaldie.

Example

Enter summary data reported in a paper and call dfs_parallel().

let min_scale = 1;
let max_scale = 7;
let n = 30;
let target_mean = 5.0;
let target_sum = target_mean * n as f64;
let target_sd = 2.78;
let rounding_error_means = 0.01;
let rounding_error_sums = rounding_error_means * n as f64;
let rounding_error_sds = 0.01;
let output_file = "parallel_results.csv";

dfs_parallel(
    min_scale,
    max_scale,
    n,
    target_sum,
    target_sd,
    rounding_error_sums,
    rounding_error_sds,
    output_file,
)

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~5–12MB
~129K SLoC