Skip to content

Add KS-test, a new example and a custom constructor. - #528

Open
Chrthegreat wants to merge 2 commits into
GeomScale:developfrom
Chrthegreat:Internal-Changes
Open

Chrthegreat wants to merge 2 commits into
GeomScale:developfrom
Chrthegreat:Internal-Changes

Conversation

@Chrthegreat

Copy link
Copy Markdown

A global uniformity diagnostic based on the Kolmogorov–Smirnov (KS) test is introduced to evaluate the quality of the generated samples. The method transforms the samples radial distances from the empirical center using the probability integral transform (u=r^d), where (d) is the dimension of the polytope. For uniformly distributed samples, the transformed values should approximately follow a Uniform(0,1) distribution. The KS statistic measures the maximum deviation between the empirical and theoretical cumulative distribution functions, while the associated p-value quantifies the evidence against uniformity.

The result looks like this:

KS Statistic: 0.028998
P-Value: 0.848145

We want KS Statistic close to 0 and p value greater than 0.05.

Other additions in this PR include some functions to read custom polytopes Ax<=b where A and b are provided in CSV files, some tests for the KS test and a new example that benchmarks the sampling methods. Also, we add a new constructor (needed for the example) in the sparse billiard walk, so we can use it the same way as the rest of the uniform walks. The logic in this constructor follows the same logic provided in the official example for the sparse billiard walk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant