Skip to content
Matrix-Induced Multiple Kernel Learning
C++ CMake Python Other
Branch: master
Clone or download
Latest commit 3b553c8 Aug 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Updated Travis CI. Aug 22, 2019
doc [ImgBot] Optimize images May 20, 2019
docker Updated docker/. Aug 23, 2019
external Open sourceing mimkl. May 18, 2019
include/mimkl Open sourceing mimkl. May 18, 2019
python Open sourceing mimkl. May 18, 2019
src Open sourceing mimkl. May 18, 2019
test Open sourceing mimkl. May 18, 2019
.clang-format Open sourceing mimkl. May 18, 2019
.gitignore Updated docker/. Aug 23, 2019
.gitmodules Open sourceing mimkl. May 18, 2019
.travis.yml Updated .travis.yml. Aug 23, 2019
CMakeLists.txt Open sourceing mimkl. May 18, 2019
CONTRIBUTING.md Open sourceing mimkl. May 18, 2019
CTestCustom.cmake Open sourceing mimkl. May 18, 2019
LICENSE Open sourceing mimkl. May 18, 2019
MAINTAINERS.md Open sourceing mimkl. May 18, 2019
README.md Updated README.md. Aug 22, 2019
clang_format_code.sh Open sourceing mimkl. May 18, 2019
setup.py Open sourceing mimkl. May 18, 2019
setup_mimkl.sh

README.md

Build Status

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://git@github.com/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://git@github.com/IBM/mimkl.git

Enable architecture optimizations (i386):

MIMKL_CXX_FLAGS="-march=native" pip install git+ssh://git@github.com/IBM/mimkl.git

Enable both:

MIMKL_CXX_FLAGS="-march=native -fopenmp" pip install git+ssh://git@github.com/IBM/mimkl.git

Docker

Pull the image from DockerHub:

docker pull drugilsberg/mimkl

Or directly build it from source:

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

Run the container:

docker run -it drugilsberg/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

You can’t perform that action at this time.