This open source Python library provide several methods for Output Kernelization.
Website and documentation: https://IOKR.github.io/
Source Code (MIT): https://github.com/IOKR/IOKR
The library has been tested on Linux, MacOSX and Windows. It requires a C++ compiler for building/installing the EMD solver and relies on the following Python modules:
- Pandas (>=1.2)
- Numpy (>=1.16)
- Scipy (>=1.0)
- Scikit-learn (>=1.0)
You can install the toolbox through PyPI with:
pip install IOKR
If you use the Anaconda python distribution, POT is available in conda-forge. To install it and the required dependencies:
conda install -c conda-forge IOKR
After a correct installation, you should be able to import the module without errors:
import IOKR
- Import the toolbox
import IOKR
- Run IOKR
from IOKR.model.model import IOKR
from sklearn.model_selection import train_test_split
from IOKR.data.load_data import load_bibtex
from sklearn.metrics import f1_score
path = "IOKR/data/bibtex"
X, Y, _, _ = load_bibtex(path)
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.33, random_state=42)
clf = IOKR()
clf.verbose = 1
L = 1e-5
sx = 1000
sy = 10
clf.fit(X=X_train, Y=Y_train, L=L, sx=sx, sy=sy)
Y_pred_train = clf.predict(X_test=X_train)
Y_pred_test = clf.predict(X_test=X_test)
f1_train = f1_score(Y_pred_train, Y_train, average='samples')
f1_test = f1_score(Y_pred_test, Y_test, average='samples')
print("Train f1 score:", f1_train,"/", "Test f1 score:", f1_test)
The examples folder contain several examples and use case for the library. The full documentation with examples and output is available on https://IOKR.github.io/.
This toolbox has been created and is maintained by
The contributors to this library are
- Florence d'Alché-Buc (Researcher)
- Luc Motte (Researcher)
- Tamim El Ahmad (Researcher)
- Gaëtan Brison (Engineer)
- Danaël Schlewer-Becker (Engineer)
- Awais Sani (Engineer)
Every contribution is welcome and should respect the contribution guidelines. Each member of the project is expected to follow the code of conduct.
You can ask questions and join the development discussion:
- On the IOKR slack channel
- On the IOKR gitter channel
- On the IOKR mailing list
You can also post bug reports and feature requests in Github issues. Make sure to read our guidelines first.
[1] Brouard, C., d'Alché-Buc, F., Szafranski, M. (2013, November). Semi-supervised Penalized Output Kernel Regression for Link Prediction. 28th International Conference on Machine Learning (ICML 2011), pp.593–600.
[2] Brouard, C., Szafranski, M., d'Alché-Buc, F. (2016). Input Output Kernel Regression: Supervised and Semi-Supervised Structured Output Prediction with Operator-Valued Kernels. Journal of Machine Learning Research, Microtome Publishing.
[3] Brouard, C., Shen, H., Dührkop, K., d'Alché-Buc, F., Böcker, S., & Rousu, J. (2016) Fast metabolite identification with input output kernel regression. Bioinformatics, Oxford University Press (OUP)