Herded Stein Weighted#

Example coreset generation using randomly generated point clouds.

This example showcases how a coreset can be generated from a dataset containing n points sampled from k clusters in space.

A coreset is generated using Stein kernel herding, with a PCIMQ base kernel.

The initial coreset generated from this procedure is then weighted, with weights determined such that the weighted coreset achieves a better maximum mean discrepancy when compared to the original dataset than the unweighted coreset.

The coreset attained from Stein kernel herding is compared to a coreset generated via uniform random sampling. Coreset quality is measured using maximum mean discrepancy (MMD).

examples.herding_stein_weighted.main(out_path=None)[source]#

Run the tabular herding example using weighted herding.

Generate a set of points from distinct clusters in a plane. Generate a coreset via weighted herding. Compare results to coresets generated via uniform random sampling. Coreset quality is measured using maximum mean discrepancy (MMD).

Parameters:

out_path (Optional[Path]) – Path to save output to, if not None, assumed relative to this module file unless an absolute path is given

Return type:

tuple[float, float]

Returns:

Coreset MMD, random sample MMD