Skip to main content

Kernel methods and classes for composable kernel learning workflows.

Project description

docs/logo_kernelmethods.png https://img.shields.io/pypi/v/kernelmethods.svg https://img.shields.io/travis/raamana/kernelmethods.svg https://coveralls.io/repos/github/raamana/kernelmethods/badge.svg?branch=master

Documentation

API and usage: https://raamana.github.io/kernelmethods/

Demo notebooks (no setup required, click on the binder logo) :

https://mybinder.org/badge_logo.svg

Arxiv preprint

A paper presenting the design and some validation is available at https://arxiv.org/abs/2005.13483

News

  • Hadamard kernel is now available (which showed potential in some bioinformatics applications like breast cancer detection).

Description

kernelmethods is a pure python library defining modular classes that provides basic kernel methods as well as an intuitive interface for advanced functionality such as composite and hyper kernels. This library fills an important void in the ever-growing python-based machine learning ecosystem, where users can only use predefined kernels and are not able to customize or extend them for their own applications, which requires great flexibility owing to their diversity and need for better performing kernel.

schmeatic:

docs/flyer.png

This library defines the KernelMatrix class that is central to all the kernel methods and machines. As the KernelMatrix class is a key bridge between input data and the various kernel learning algorithms, it is designed to be highly usable and extensible to different applications and data types. Besides being able to apply basic kernels on a given sample (to produce a KernelMatrix), this library provides various kernel operations, such as normalization, centering, product, alignment evaluation, linear combination and ranking (by various performance metrics) of kernel matrices.

In addition, we provide several convenient classes, such as KernelSet and KernelBucket for easy management of a large collection of kernels. Dealing with a diverse configuration of kernels is necessary for automatic kernel selection and optimization in applications such as Multiple Kernel Learning (MKL) and the like.

In addition to the common numerical kernels such as the Gaussian and Polynomial kernels, we designed this library to make it easy to develop categorical, string and graph kernels, with the same attractive properties of intuitive and highly-testable API. In addition to providing native implementation of non-numerical kernels, we aim to provide a deeply and easily extensible framework for arbitrary input data types, such as sequences, trees and graphs etc, via data structures such as pyradigm.

Moreover, drop-in Estimator classes are provided, called KernelMachine, offering the power of SVM for seamless usage in the scikit-learn ecosystem. Another useful class is called OptimalKernelSVR which finds the most optimal kernel func for a given sample, and trains the SVM using the optimal kernel.

Docs

API and Usage: https://raamana.github.io/kernelmethods/

Demo notebook: on binder.

A paper presenting the design and some validation is available here

Note

The software is beta. All types of contributions are greatly welcome.

Dedication

This library is dedicated to The Concert for Bangladesh, George Harrison and Pandit Ravi Shankar, who moved me immensely with their empathy and kindness, by organizing the first benefit concert ever to raise international awareness and funds for Bangladesh’s liberation war in 1971.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kernelmethods-0.3.tar.gz (613.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kernelmethods-0.3-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file kernelmethods-0.3.tar.gz.

File metadata

  • Download URL: kernelmethods-0.3.tar.gz
  • Upload date:
  • Size: 613.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.13.1 HTTPX/0.28.1

File hashes

Hashes for kernelmethods-0.3.tar.gz
Algorithm Hash digest
SHA256 085681c7794a6686b81ede60854734a2205b9a23d741786f5baa8b9a9d09ed37
MD5 ef153469f1ca16094db32c0472631bbe
BLAKE2b-256 f0aa8754f5ba69d1afa5611e9f3c63448f10a3cbf0c8539c69fa56cf397d994a

See more details on using hashes here.

File details

Details for the file kernelmethods-0.3-py3-none-any.whl.

File metadata

  • Download URL: kernelmethods-0.3-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.13.1 HTTPX/0.28.1

File hashes

Hashes for kernelmethods-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5a1297890f97f5730f7d1d8f959533d21059aefa5b3fe821e56ec9e6f410b0fa
MD5 0a6d5172eba0de07f0e94bcfb2fec00c
BLAKE2b-256 fd44c364578042197a13588326ab3c0480beadff900642e0ba830dce9b5254d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page