Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The package is part of the [PyKale](https://github.com/pykale/pykale) ecosystem
- Multilinear Principal Component Analysis (`MPCA`) [[1](#references)]
- Transferable / generalizable feature extraction across domains or groups:
- Correlation Alignment (`CORAL`) [[13](#references)]
- Geodesic Flow Kernel (`GFK`) [[14](#references)]
- Transfer Component Analysis (`TCA`) [[2](#references)]
- Joint Distribution Adaptation (`JDA`) [[3](#references)]
- Balanced Distribution Adaptation (`BDA`) [[4](#references)]
Expand All @@ -38,6 +39,10 @@ The package is part of the [PyKale](https://github.com/pykale/pykale) ecosystem
- scikit-learn style `fit`, `transform`, `predict`, `fit_transform`, and `fit_predict` workflows where applicable.
- Most methods accept additional `covariates` — e.g., domain or group labels — alongside `X` and `y`, with optional one-hot encoding for categorical values; multiblock transformers (CIFE, AJIVE) take `groups` to specify block membership.

<p align="center">
<img src="https://github.com/pykale/linear/raw/main/docs/images/api_map.jpg" width="100%" alt="KaleLinear API map: transformers (embed) and estimators (predict) arranged by common vs. specific learning" />
</p>

KaleLinear requires Python 3.10 or later. Core dependencies include:

- [NumPy](http://www.numpy.org/)
Expand Down Expand Up @@ -140,6 +145,8 @@ Worked examples for the main transformers and estimators are collected in

[13] Sun, B., Feng, J. and Saenko, K., 2016. [Return of frustratingly easy domain adaptation](https://ojs.aaai.org/index.php/AAAI/article/view/10306). In _Proceedings of the AAAI Conference on Artificial Intelligence_ (Vol. 30, No. 1, pp. 2058-2065).

[14] Gong, B., Shi, Y., Sha, F. and Grauman, K., 2012. [Geodesic flow kernel for unsupervised domain adaptation](https://ieeexplore.ieee.org/document/6247911). In _IEEE Conference on Computer Vision and Pattern Recognition_ (pp. 2066-2073).

## Other open domain adaptation repositories

- [POT: Python Optimal Transport](https://github.com/rflamary/POT)
Expand Down
Binary file added docs/images/api_map.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions docs/images/api_map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/source/api_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ The transformer classes are also available through the PyKale-compatible alias
:undoc-members:
:show-inheritance:

.. autoclass:: GFK
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: MIDA
:members:
:undoc-members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ covariates, side information, or unlabeled target samples.
Main Features
-------------

* Transformer models for learning feature embeddings: CORAL, MPCA, TCA, JDA,
* Transformer models for learning feature embeddings: CORAL, GFK, MPCA, TCA, JDA,
BDA, MIDA, CIFE, and AJIVE.
* Estimator models for classification and adaptation: LapSVM, LapRLS, ARSVM,
ARRLS, CoIRSVM, CoIRLS, and GSDA.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Usage
Domain Adaptation Transformers
------------------------------

TCA, JDA, BDA, and CORAL take all samples in a single input array and receive
TCA, JDA, BDA, CORAL, and GFK take all samples in a single input array and receive
domain labels through ``covariates``. Use ``target_covariate`` to identify
which domain label is the target domain. CORAL is asymmetric: after fitting, it
aligns source samples to the target covariance and centers target samples.
Expand Down
4 changes: 2 additions & 2 deletions kalelinear/embed.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Embedding models exposed with a PyKale-style API."""

from kalelinear.transformer import AJIVE, BDA, CIFE, CORAL, JDA, MIDA, MPCA, TCA
from kalelinear.transformer import AJIVE, BDA, CIFE, CORAL, GFK, JDA, MIDA, MPCA, TCA

__all__ = ["TCA", "JDA", "BDA", "CORAL", "MIDA", "MPCA", "CIFE", "AJIVE"]
__all__ = ["TCA", "JDA", "BDA", "CORAL", "GFK", "MIDA", "MPCA", "CIFE", "AJIVE"]
2 changes: 2 additions & 0 deletions kalelinear/transformer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from kalelinear.transformer._ajive import AJIVE
from kalelinear.transformer._cife import CIFE
from kalelinear.transformer._coral import CORAL
from kalelinear.transformer._gfk import GFK
from kalelinear.transformer._jda import BDA, JDA
from kalelinear.transformer._mida import MIDA
from kalelinear.transformer._mpca import MPCA
Expand All @@ -11,6 +12,7 @@
"JDA",
"BDA",
"CORAL",
"GFK",
"MIDA",
"MPCA",
"CIFE",
Expand Down
Loading
Loading