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

NearestNeighborReweightAdapter([...])

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, ...])

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.

Adapters:

SubspaceAlignmentAdapter([n_components, ...])

Domain Adaptation Using Subspace Alignment.

TransferComponentAnalysisAdapter([kernel, ...])

Transfer Component Analysis.

TransferJointMatchingAdapter([n_components, ...])

Domain Adaptation Using TJM: Transfer Joint Matching.

TransferSubspaceLearning([base_estimator, ...])

Domain Adaptation Using 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.

Other DA methods

JDOTRegressor([base_estimator, alpha, ...])

Joint Distribution Optimal Transport Regressor proposed in [10]

DASVMClassifier([base_estimator, k, ...])

DASVM Estimator:

DA pipeline

make_da_pipeline(*steps[, memory, verbose, ...])

Construct a Pipeline from the given estimators.

Shared(base_estimator, **kwargs)

PerDomain(base_estimator, **kwargs)

Utilities

source_target_split(*arrays, sample_domain)

Split data into source and target domains

per_domain_split(*arrays, sample_domain)

Split data into multiple source and target domains

Deep learning DA skada.deep:

Some methods for deep domain adaptation.

DeepCoralLoss([assume_centered])

Loss DeepCORAL

DeepJDOTLoss([reg_dist, reg_cl, ...])

Loss DeepJDOT.

DANLoss([sigmas])

Loss DAN

CDANLoss([domain_criterion])

Conditional Domain Adversarial Networks (CDAN) loss.

DeepCoral(module, layer_name[, reg, ...])

DeepCORAL domain adaptation method.

DeepJDOT(module, layer_name[, reg_dist, ...])

DeepJDOT.

DANN(module, layer_name[, reg, ...])

Domain-Adversarial Training of Neural Networks (DANN).

CDAN(module, layer_name[, reg, ...])

Conditional Domain Adversarial Networks (CDAN).

DA metrics skada.metrics

SupervisedScorer([scoring, greater_is_better])

Compute score on supervised dataset.

ImportanceWeightedScorer([weight_estimator, ...])

Score based on source data using sample weight.

PredictionEntropyScorer([greater_is_better, ...])

Score based on the entropy of predictions on unsupervised dataset.

DeepEmbeddedValidation([domain_classifier, ...])

Loss based on source data using features representation to weight samples.

SoftNeighborhoodDensity([T, greater_is_better])

Score based on the entropy of similarity between unsupervised dataset.

CircularValidation([source_scorer, ...])

Score based on a circular validation strategy.

MixValScorer([alpha, ice_type, scoring, ...])

MixVal scorer for unsupervised domain adaptation.

Model Selection skada.model_selection

SourceTargetShuffleSplit([n_splits, ...])

Source-Target-Shuffle-Split cross-validator.

DomainShuffleSplit([n_splits, test_size, ...])

Domain-Shuffle-Split cross-validator.

StratifiedDomainShuffleSplit([n_splits, ...])

Stratified-Domain-Shuffle-Split cross-validator.

LeaveOneDomainOut([max_n_splits, test_size, ...])

Leave-One-Domain-Out cross-validator.

Datasets skada.datasets

Utilities to produce datasets for testing and benchmarking.

make_shifted_blobs([n_samples, n_features, ...])

Generate source and shift target isotropic Gaussian blobs .

make_shifted_datasets([n_samples_source, ...])

Generate source and shift target.

make_dataset_from_moons_distribution([...])

Make dataset from moons.

make_variable_frequency_dataset([...])

Make dataset with different peak frequency.

Utilities skada.utils

check_X_y_domain(X, y[, sample_domain, ...])

Input validation for domain adaptation (DA) estimator.

extract_source_indices(sample_domain)

Extract the indices of the source samples.

extract_domains_indices(sample_domain[, ...])

Extract the indices of the specific domain samples.

source_target_merge(*arrays[, sample_domain])

Merge source and target domain data based on sample domain labels.