/libTLDA

Library of transfer learning and domain adaptation classifiers

Primary LanguagePythonMIT LicenseMIT

libTLDA

Coverage BuildStatus docs DOI

Library of transfer learners and domain-adaptive classifiers.

This package contains the following classifiers:

Python-specific classifiers:

Matlab-specific classifiers:

Python

Python version

Installation

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

Usage

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()
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.

Matlab

Matlab version

Installation:

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

Usage

There is an example script that can be edited to test the different classifiers:

example.m

Contact:

Questions, comments and bugs can be submitted in the issues tracker. If you have a particular method / algorithm / technique in mind that you feel should be included, you can also submit this in the tracker.