IDomainAdapter<T>

Interfaces · AiDotNet.TransferLearning.DomainAdaptation

Defines the interface for adapting models to reduce distribution shift between source and target domains.

Known implementations: CORALDomainAdapter<T>, MMDDomainAdapter<T>

For Beginners

Domain adaptation is like helping someone adjust to a new environment. Even when features are mapped correctly, the source and target domains might have different statistical properties (like different averages or variability). A domain adapter helps reduce these differences so a model trained on source data works better on target data.

How It Works

Think of it like adjusting your eyes when moving from a bright room to a dim room - the objects are the same, but your perception needs to adapt to the new lighting conditions.

Properties

Property Summary
bool RequiresTraining { get; } Determines if the adapter requires training before use.
string AdaptationMethod { get; } Gets the name of the adaptation method.

Methods

Method Summary
Matrix<T> AdaptSource(Matrix<T> sourceData, Matrix<T> targetData) Adapts source domain data to better match the target domain distribution.
Matrix<T> AdaptTarget(Matrix<T> targetData, Matrix<T> sourceData) Adapts target domain data to better match the source domain distribution.
T ComputeDomainDiscrepancy(Matrix<T> sourceData, Matrix<T> targetData) Computes the domain discrepancy (how different the domains are).
void Train(Matrix<T> sourceData, Matrix<T> targetData) Trains the domain adapter if required.