Skip to content

PhysBoom/mmd_critic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Python package for the MMD Critic method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages