LinearFeatureMapper<T>

Models & Types · AiDotNet.TransferLearning.FeatureMapping

Implements a simple linear projection for mapping features between domains.

Implements: IFeatureMapper<T>

For Beginners

Linear feature mapping is the simplest approach to translating between domains. It uses matrix multiplication to transform features, similar to how you might resize an image using simple scaling. While not as sophisticated as other methods, it’s fast and works well when domains are reasonably similar.

How It Works

Think of it like using a simple multiplication factor to convert between units (like converting feet to meters). It’s not perfect for all situations, but it’s a good starting point.

Constructors

Constructor Summary
LinearFeatureMapper() Initializes a new instance of the LinearFeatureMapper class.

Properties

Property Summary
bool IsTrained { get; set; } Indicates whether the mapper has been trained.

Methods

Method Summary
Matrix<T> MapToSource(Matrix<T> targetFeatures, int sourceDimension) Maps features from target domain back to source domain.
Matrix<T> MapToTarget(Matrix<T> sourceFeatures, int targetDimension) Maps features from source domain to target domain.
T GetMappingConfidence() Gets the confidence score for the mapping quality.
void Train(Matrix<T> sourceData, Matrix<T> targetData) Trains the linear feature mapper using Principal Component Analysis (PCA)-like approach.