Skip to main content

Python package for domain adaptation in multivariate regression

Project description

Domain-invariant partial least squares regression (di-PLS)

Python implementation of (m)di-PLS for domain adaptation in multivariate regression problems.

Installation

pip install diPLSlib

Usage

How to apply di-PLS

Train regression model

from diPLSlib.models import DIPLS as dipls

m = dipls(X, y, X_source, X_target, 2)
l = [100000] #  Regularization
m.fit(l)

# Typically X=X_source and y are the corresponding response values

Apply the model

yhat_dipls, err = m.predict(X_test, y_test=[])

How to apply mdi-PLS

from diPLSlib.models import DIPLS as dipls

# Training
m = dipls(X, y, X_source, X_target, 2)
l = [100000] #  Regularization
m.fit(l, target_domain=2)

# Testing
yhat_dipls, err = m.predict(X_test, y_test=[])


# X_target = [X1, X2, ... , Xk] is a list of target domain data
# The parameter target_domain specifies for which domain the model should be trained (here X2).

How to apply GCT-PLS

from diPLSlib.models import GCTPLS as gctpls

# Training
m = gctpls(X, y, X_source, X_target, 2)
l = [100] #  Regularization
m.fit(l)

# Testing
yhat_gct, err = m.predict(X_test, y_test=[])


# X_source and X_target hold the same samples measured in the source and target domain, respectively.

Acknowledgements

The first version of di-PLS was developed by Ramin Nikzad-Langerodi, Werner Zellinger, Edwin Lughofer, Bernhard Moser and Susanne Saminger-Platz and published in:

Further refinements to the initial algorithm were published in:

  • R. Nikzad-Langerodi, W. Zellinger, S. Saminger-Platz and B. Moser, "Domain-Invariant Regression Under Beer-Lambert's Law," 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), Boca Raton, FL, USA, 2019, pp. 581-586, https://doi.org/10.1109/ICMLA.2019.00108.

  • Ramin Nikzad-Langerodi, Werner Zellinger, Susanne Saminger-Platz, Bernhard A. Moser, Domain adaptation for regression under Beer–Lambert’s law, Knowledge-Based Systems, Volume 210, 2020, https://doi.org/10.1016/j.knosys.2020.106447.

  • Bianca Mikulasek, Valeria Fonseca Diaz, David Gabauer, Christoph Herwig, Ramin Nikzad-Langerodi, "Partial least squares regression with multiple domains" Journal of Chemometrics 2023 37 (5), e3477, https://doi.org/10.13140/RG.2.2.23750.75845

  • Ramin Nikzad-Langerodi & Florian Sobieczky (2021). Graph‐based calibration transfer. Journal of Chemometrics, 35(4), e3319. https://doi.org/10.1002/cem.3319

Contact us

Bottleneck Analytics GmbH
info@bottleneck-analytics.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diplslib-2.0.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diPLSlib-2.0.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file diplslib-2.0.0.tar.gz.

File metadata

  • Download URL: diplslib-2.0.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for diplslib-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b3f61319e642ccc89be1a21228b1c5400aa4823a07b2fc00c2cd75e5f87d3e00
MD5 f901c12e517c71b4e15905dc8be6bc91
BLAKE2b-256 ac8e89b2d147929e4bc9fd710f074f230c7d34b3d800de213067fc8bbc661c5a

See more details on using hashes here.

File details

Details for the file diPLSlib-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: diPLSlib-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for diPLSlib-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56baa0d2b317ce435442218dd9f4bbd31b09e71b18c214e1238129d0bf4c9a33
MD5 c10ac0c01c0fc137ed71ff353eb91ba3
BLAKE2b-256 9087574e933dc56fe8d546b5529375fbcbcec7f02aa4374eb3f1db1ace1a9b71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page