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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mmd_critic-0.1.2.tar.gz.
File metadata
- Download URL: mmd_critic-0.1.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2165a4006191293f0c1cfac4caf211248b1f417245690107ca61c95a585fb369
|
|
| MD5 |
a82f0475457caf4d0ff158118fb4ce23
|
|
| BLAKE2b-256 |
3e35934bbcb8930616e95c1f46f85a209659f6ec25c328c8eb20f90297a449db
|
File details
Details for the file mmd_critic-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mmd_critic-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d79c5df264a5a1f63eac000109df861acecbd08c8324b5946aa2d4bac696d46
|
|
| MD5 |
8b55127c2ae8bf08c1e88457dc7a2d17
|
|
| BLAKE2b-256 |
f62d2eaebda72968b6f7504cfb9722b61bbf0724766baff3ed10528b9d4568bf
|