Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
/ mimkl Public archive

Matrix-Induced Multiple Kernel Learning

License

Notifications You must be signed in to change notification settings

IBM/mimkl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ed53cb6 · Mar 29, 2022

History

20 Commits
Nov 4, 2020
May 20, 2019
Nov 4, 2020
May 18, 2019
May 18, 2019
May 18, 2019
May 18, 2019
May 18, 2019
May 18, 2019
Aug 23, 2019
May 18, 2019
Nov 4, 2020
May 18, 2019
May 18, 2019
Nov 5, 2020
May 18, 2019
May 18, 2019
Mar 29, 2022
May 18, 2019
Nov 4, 2020
May 18, 2019

Repository files navigation

Build Status CII Best Practices

mimkl

A C++ library for Matrix-Induced Multiple Kernel Learning (MIMKL) with python bindings. The library implements unsupervised and supervised multiple kernel learning algorithms and the most common kernel functions as well as matrix-inducing versions thereof. The python wrapper exposes classes with interfaces that allow a seamless integration with scikit-learn.

The implementation has been used to generate all the results for the paper "Pathway-Induced Multiple Kernel Learning".

Requirements

  • C++14 capable C++ compiler
  • cmake (>3.0.2)
  • Python

pymimkl

pymimkl is the python package for matrix induced multiple kernel learning. It uses bindings from compiled mimkl (C++) (see Building) and provides scikit-learn like classifiers.

Installation

Install directly from git. This builds the mimkl project and the pymimkl bindings and might take some time.

pip install git+ssh://[email protected]/IBM/mimkl.git

Optimize the build by passing additional C++ flags. For example to enable parallelism (compiler must support OpenMP):

MIMKL_CXX_FLAGS="-fopenmp" pip install git+ssh://[email protected]/IBM/mimkl.git

Enable architecture optimizations (i386):

MIMKL_CXX_FLAGS="-march=native" pip install git+ssh://[email protected]/IBM/mimkl.git

Enable both:

MIMKL_CXX_FLAGS="-march=native -fopenmp" pip install git+ssh://[email protected]/IBM/mimkl.git

Docker

Pull the image from DockerHub:

docker pull tsenit/mimkl

Or directly build it from source:

docker-compose -f docker/docker-compose.yml build

Run the container:

docker run -it tsenit/mimkl /bin/bash

Development

Clone the repository:

git clone https://github.com/IBM/mimkl

Intialize and update the submodules

cd mimkl
git submodule init
git submodule update

Install pymimkl with pip.

pip install .
# to persist the created build_ folder for faster rebuilding and C++ testing:
# pip install -e .

Same as before to optimize the build.

MIMKL_CXX_FLAGS="-march=native -fopenmp" pip install .

run tests with

python setup.py test

Building

Clone the repository:

git clone https://github.com/IBM/mimkl

Intialize and update the submodules

cd mimkl
git submodule init
git submodule update

Create a build folder (in source build):

mkdir build
cd build

Generate the building files:

cmake ..
# unfortuantely, cmake is not aware of virtual environments. The fix is
# cmake -DPYTHON_EXECUTABLE=$(command -v python) ..
# https://github.com/pybind/pybind11/issues/99

Compile the code:

make

Test it:

make test
# make test CTEST_OUTPUT_ON_FAILURE=TRUE

Take note that the python tests have additional requirements (e.g. scipy).

References

Publications

EasyMKL: a scalable multiple kernel learning algorithm

Unsupervised multiple kernel learning for heterogeneous data integration ("UMKLKNN" im mimkl)

Code

eigen http://eigen.tuxfamily.org/index.php?title=Main_Page

dlib http://dlib.net

pybind11 https://github.com/pybind/pybind11

Uses of mimkl

PIMKL: Pathway-Induced Multiple Kernel Learning https://rdcu.be/bBN6U
for which mimkl was developed.

PIMKL algorithm