API and modules
Main module skada
Sample reweighting DA methods
- DAEstimators with adapters (Pipeline):
DensityReweight([base_estimator, ...])Density re-weighting pipeline adapter and estimator.
GaussianReweight([base_estimator, reg])Gaussian approximation re-weighting pipeline adapter and estimator.
DiscriminatorReweight([base_estimator, ...])Discriminator re-weighting pipeline adapter and estimator.
KLIEPReweight([base_estimator, gamma, cv, ...])KLIEPReweight pipeline adapter and estimator.
NearestNeighborReweight([base_estimator, ...])Density re-weighting pipeline adapter and estimator.
MMDTarSReweight([base_estimator, gamma, ...])Target shift reweighting using MMD.
KMMReweight([base_estimator, kernel, gamma, ...])KMMReweight pipeline adapter and estimator.
- Adapters:
DensityReweightAdapter([weight_estimator])Adapter based on re-weighting samples using density estimation.
GaussianReweightAdapter([reg])Gaussian approximation re-weighting method.
DiscriminatorReweightAdapter([domain_classifier])Gaussian approximation re-weighting method.
KLIEPReweightAdapter(gamma[, cv, n_centers, ...])Kullback-Leibler Importance Estimation Procedure (KLIEPReweight).
Adapter based on re-weighting samples using a KNN,
MMDTarSReweightAdapter(gamma[, reg, tol, ...])Target shift reweighting using MMD.
KMMReweightAdapter([kernel, gamma, degree, ...])Kernel Mean Matching (KMMReweight).
Sample mapping and alignment DA methods
- DAEstimators with adapters (Pipeline):
SubspaceAlignment([base_estimator, ...])Domain Adaptation Using Subspace Alignment.
TransferComponentAnalysis([base_estimator, ...])Domain Adaptation Using Transfer Component Analysis.
TransferJointMatching([base_estimator, ...])TransferSubspaceLearning([base_estimator, ...])Domain Adaptation Using Transfer Subspace Learning.
CORAL([base_estimator, reg, assume_centered])CORAL pipeline with adapter and estimator.
OTMapping([base_estimator, metric, norm, ...])OTmapping pipeline with adapter and estimator.
EntropicOTMapping([base_estimator, metric, ...])EntropicOTMapping pipeline with adapter and estimator.
ClassRegularizerOTMapping([base_estimator, ...])ClassRegularizedOTMapping pipeline with adapter and estimator.
LinearOTMapping([base_estimator, reg, bias])Returns a the linear OT mapping method with adapter and estimator.
MMDLSConSMapping([base_estimator, gamma, ...])MMDLSConSMapping pipeline with adapter and estimator.
MultiLinearMongeAlignment([base_estimator, ...])MultiLinearMongeAlignment pipeline with adapter and estimator.
- Adapters:
SubspaceAlignmentAdapter([n_components, ...])Domain Adaptation Using Subspace Alignment.
TransferComponentAnalysisAdapter([kernel, ...])Transfer Component Analysis.
TransferJointMatchingAdapter([n_components, ...])Domain Adaptation Using TJM: Transfer Joint Matching.
Domain Adaptation Using TSL: Transfer Subspace Learning.
CORALAdapter([reg, assume_centered])Estimator based on Correlation Alignment [1]_.
OTMappingAdapter([metric, norm, max_iter])Domain Adaptation Using Optimal Transport.
EntropicOTMappingAdapter([reg_e, metric, ...])Domain Adaptation Using Optimal Transport.
ClassRegularizerOTMappingAdapter([reg_e, ...])Domain Adaptation Using Optimal Transport.
LinearOTMappingAdapter([reg, bias])Domain Adaptation Using Optimal Transport.
MMDLSConSMappingAdapter(gamma[, reg_k, ...])Location-Scale mapping minimizing the MMD with a Gaussian kernel.
MultiLinearMongeAlignmentAdapter([reg, ...])Aligns multiple domains using Gaussian Monge mapping to a barycenter.
Other DA methods
|
Joint Distribution Optimal Transport Classifier proposed in [10] |
|
Joint Distribution Optimal Transport Regressor proposed in [10] |
|
DASVM Estimator: |
|
Label propagation using optimal transport plan. |
|
JCPOT Label Propagation Adapter for multi source target shift |
DA pipeline
|
Construct a |
|
|
|
|
|
Selects only source domains for fitting base estimator. |
|
Selects only target domains for fitting base estimator. |
|
Utilities
|
Split data into source and target domains |
|
Split data into multiple source and target domains |
Deep learning DA skada.deep:
Some methods for deep domain adaptation.
Deep learning DA methods
|
DeepCORAL domain adaptation method. |
|
DeepJDOT. |
|
DAN domain adaptation method. |
|
Domain-Adversarial Training of Neural Networks (DANN). |
|
Conditional Domain Adversarial Networks (CDAN). |
|
|
|
Contrastive Adaptation Network (CAN) domain adaptation method. |
|
Margin Disparity Discrepancy (MDD). |
|
Domain Adaptation with SPA. |
SKADA deep learning DA losses
|
Loss DeepCORAL |
|
Loss DeepJDOT. |
|
Loss DAN |
|
Loss DANN. |
|
Conditional Domain Adversarial Networks (CDAN) loss. |
|
Loss MCC. |
|
Loss for Contrastive Adaptation Network (CAN) |
|
Loss MDD. |
|
Loss SPA. |
Torch compatible DA losses in skada.deep.losses
|
Define the mmd loss based on multi-kernel defined in [R095e4befb364-14]. |
|
Estimate the Frobenius norm divide by 4*n**2 |
|
Compute the OT loss for DeepJDOT method [Ra0fd271667d9-13]. |
|
Estimate the Frobenius norm divide by 4*n**2 |
|
Define the contrastive domain discrepancy loss based on [Rfc1dd7997531-33]. |
|
Compute the GDA loss between two graphs. |
|
Compute the NAP loss. |
DA metrics skada.metrics
|
Compute score on supervised dataset. |
|
Score based on source data using sample weight. |
|
Score based on the entropy of predictions on unsupervised dataset. |
|
Loss based on source data using features representation to weight samples. |
|
Score based on the entropy of similarity between unsupervised dataset. |
|
Score based on a circular validation strategy. |
|
MixVal scorer for unsupervised domain adaptation. |
|
MaNo scorer inspired by [R34d6d6853b0e-37], an approach for unsupervised accuracy estimation. |
Model Selection skada.model_selection
|
Source-Target-Shuffle-Split cross-validator. |
|
Domain-Shuffle-Split cross-validator. |
|
Stratified-Domain-Shuffle-Split cross-validator. |
|
Leave-One-Domain-Out cross-validator. |
Datasets skada.datasets
Utilities to produce datasets for testing and benchmarking.
|
Container carrying all dataset domains. |
|
Generate source and shift target isotropic Gaussian blobs . |
|
Generate source and shift target. |
Make dataset from moons. |
|
Make dataset with different peak frequency. |
Utilities skada.utils
|
Input validation for domain adaptation (DA) estimator. |
|
Extract the indices of the source samples. |
|
Extract the indices of the specific domain samples. |
|
Merge source and target domain data based on sample domain labels. |