Skip to content

IvanoLauriola/MKLpy

Repository files navigation

MKLpy

Documentation Status Build Status Coverage Status PyPI version License: GPL v3

MKLpy is a framework for Multiple Kernel Learning (MKL) inspired by the scikit-learn project.

This package contains:

  • the implementation of some MKL algorithms;
  • tools to operate on kernels, such as normalization, centering, summation, average...;
  • metrics, such as kernel_alignment, radius of Minimum Enclosing Ball, margin between classes, spectral ratio...;
  • kernel functions, including boolean kernels (disjunctive, conjunctive, DNF, CNF) and string kernels (spectrum, fixed length and all subsequences).

The main MKL algorithms implemented in this library are

Name Short description Status Source
AverageMKL Computes the simple average of base kernels Available -
EasyMKL Fast and memory efficient margin-based combination Available [1]
GRAM Radius/margin ratio optimization Available [2]
R-MKL Radius/margin ratio optimization Available [3]
MEMO Margin maximization and complexity minimization Available [4]
PWMK Heuristic based on individual kernels performance Avaible [5]
FHeuristic Heuristic based on kernels alignment Available [6]
CKA Centered kernel alignment optimization in closed form Available [7]
SimpleMKL Alternate margin maximization Work in progress [5]

The documentation of MKLpy is available on readthedocs.io!

Installation

MKLpy is also available on PyPI:

pip install MKLpy

MKLpy leverages multiple scientific libraries, that are numpy, scikit-learn, PyTorch, and CVXOPT.

Examples

The folder examples contains several scripts and snippets of codes to show the potentialities of MKLpy. The examples show how to train a classifier, how to process data, and how to use kernel functions.

Additionally, you may read our tutorials

Work in progress

MKLpy is under development! We are working to integrate several features, including:

  • additional MKL algorithms;
  • more kernels for structured data;
  • efficient optimization

Citing MKLpy

If you use MKLpy for a scientific purpose, please cite the following preprint.

@article{lauriola2020mklpy,
  title={MKLpy: a python-based framework for Multiple Kernel Learning},
  author={Lauriola, Ivano and Aiolli, Fabio},
  journal={arXiv preprint arXiv:2007.09982},
  year={2020}
}