This package contains the following classifiers:
- Importance-weighting with ratios of Gaussians (Shimodaira, 2000)
- Importance-weighting with kernel density estimation (Sugiyama & Müller, 2005)
- Importance-weighting with logistic discrimination (Bickel et al., 2009)
- Kernel Mean Matching (Huang et al., 2006)
- Nearest-neighbour-based weighting (Loog, 2015)
- Transfer Component Analysis (Pan et al, 2009)
- Geodesic Flow Kernel (Gong et al., 2012) (matlab-only)
- Subspace Alignment (Fernando et al., 2013)
- Semi-supervised Subspace Alignment (Yao et al., 2015) (python-only)
- Structural Correspondence Learning (Blitzer et al., 2006)
- Robust Bias-Aware Classification (Liu & Ziebart, 2014)
- Feature-Level Domain Adaptation (Kouw et al., 2016)
- Target Contrastive Pessimistic Risk (Kouw et al., 2017) (python-only)
Installation can be done through pip:
pip install libtlda
The pip package installs all dependencies. To ensure that these dependencies that don't mess up your current python environment, you should set up a virtual environment. If you're using conda, this can be taken care of by running:
conda env create -f environment.yml
source activate libtlda
LibTLDA follows a similar structure as scikit-learn. There are several classes of classifiers that can be imported through for instance:
from libtlda.iw import ImportanceWeightedClassifier
With a data set of labeled source samples (X,y)
and unlabeled target samples Z
, the classifier can be called and trained using:
clf = ImportanceWeightedClassifier(iwe='kmm')
clf.fit(X, y, Z)
Given a trained classifier, predictions can be made as follows:
predictions = clf.predict(Z)
Check the documentation for more information on specific classes, methods and functions.
First clone the repository and change directory to matlab:
git clone https://github.com/wmkouw/libTLDA
cd libTLDA/matlab/
In the matlab command window, call the installation script. It downloads all dependencies (minFunc, libsvm) and adds them, along with libtlda
, to your path:
install.m
There is an example script that can be edited to test the different classifiers:
example.m
Questions, comments and bugs can be submitted in the issues tracker. Any particular method / algorithm / technique that you feel should be included, can be submitted as an issue as well.