Python package for the MMD Critic method
Project description
mmd-critic
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mmd_critic-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4311ab17799168abe14cf2f71536f4ffd36925b4c292f791667ea7740e866453 |
|
MD5 | adbaffe48d5d38c1b0fa01792ee260df |
|
BLAKE2b-256 | 3d5d08bddf4f4fe04dcf439fc798d4785bcd4a1daa828bbd558a3be414cc80c8 |