MissingFeatureHandler<T>
Models & Types · AiDotNet.FederatedLearning.Vertical
Handles missing features in vertical FL when not all parties have data for all entities.
Inheritance: FederatedLearningComponentBase<T> → MissingFeatureHandler<T>
For Beginners
In real-world VFL, not all parties have records for all entities. A bank might have 100,000 customers while the partner hospital only has 30,000 patients, with only 20,000 in common. For the other 80,000 bank customers, the hospital’s features are “missing”.
How It Works
This class provides strategies for handling those missing features:
Reference: Based on “Vertical Federated Learning with Missing Features During Training and Inference” (2024).
Constructors
| Constructor | Summary |
|---|---|
MissingFeatureHandler(MissingFeatureOptions options) |
Initializes a new instance of MissingFeatureHandler. |
Properties
| Property | Summary |
|---|---|
MissingFeatureStrategy Strategy { get; } |
Gets the configured missing feature strategy. |
Methods
| Method | Summary |
|---|---|
Tensor<T> CreateMissingnessIndicator(int batchSize, int partyCount, IReadOnlyCollection<int> missingPartyIndices) |
Creates a missingness indicator tensor for a batch, marking which features are imputed. |
Tensor<T> ImputeEmbeddings(string partyId, int embeddingDimension, int batchSize) |
Imputes missing embeddings for a party that doesn’t have data for the current batch entities. |
bool ShouldIncludeEntity(string entityId, IReadOnlyCollection<string> availablePartyIds, int totalParties) |
Determines whether an entity should be included in training based on its availability across parties. |
void UpdateStatistics(string partyId, Tensor<T> embeddings) |
Updates the running mean statistics for a party’s embeddings. |