Skip to main content

mmd-critic

License

A Python package for implementing the Maximum Mean Discrepancy Critic (MMD-Critic) method. This method is commonly used to find prototypes and criticisms (outliers, roughly speaking) in datasets.

Installation

You can install the package via pip:

pip install mmd-critic

Usage

from mmd_critic import MMDCritic
from mmd_critic.kernels import RBFKernel

critic = MMDCritic(X, RBFKernel(sigma=1), criticism_kernel=RBFKernel(2), labels=y)

protos, proto_labels = critic.select_prototypes(50)
criticisms, criticism_labels = critic.select_criticisms(10, protos)

Note that the labels and criticism_kernel are optional arguments which are None by default. If criticism_kernel is none, then the prototype kernel will be used for criticisms. If labels are none, then returned labels will be None.

See more in the examples

More Info

Read my article for more info on the MMD critic method. I also encourage you to read the original paper.

Acknowledgements

The implementation here is based on Been Kim's original implementation and paper

Metadata

Release files for mmd-critic 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mmd-critic 0.1.2
File Size Uploaded Provenance
mmd_critic-0.1.2.tar.gz 7.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mmd-critic 0.1.2
File Interpreter ABI Platform
mmd_critic-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / mmd_critic-0.1.2.tar.gz

Download URL mmd_critic-0.1.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2165a4006191293f0c1cfac4caf211248b1f417245690107ca61c95a585fb369
BLAKE2b-256 checksum
How to use checksums
3e35934bbcb8930616e95c1f46f85a209659f6ec25c328c8eb20f90297a449db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release files / mmd_critic-0.1.2-py3-none-any.whl

Download URL mmd_critic-0.1.2-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d79c5df264a5a1f63eac000109df861acecbd08c8324b5946aa2d4bac696d46
BLAKE2b-256 checksum
How to use checksums
f62d2eaebda72968b6f7504cfb9722b61bbf0724766baff3ed10528b9d4568bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Security for mmd-critic 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page