MultiTaskSplitter<T>

Models & Types · AiDotNet.Preprocessing.DataPreparation.Splitting.DomainSpecific

Multi-task splitter that ensures consistent splits across multiple related tasks.

Inheritance: DataSplitterBase<T> → MultiTaskSplitter<T>

For Beginners

In multi-task learning, we train a model on multiple related tasks simultaneously. It’s important that the same samples appear in train/test consistently across all tasks to fairly evaluate transfer learning benefits.

How It Works

Example: For a model predicting both “sentiment” and “topic” from text:

  • Same documents should be in training for both tasks
  • Same documents should be in testing for both tasks

When to Use:

  • Multi-task neural networks
  • Transfer learning experiments
  • Multi-output regression/classification

Constructors

Constructor Summary
MultiTaskSplitter(double testSize, int taskColumn, bool stratifyByTask, bool shuffle, int randomSeed) Creates a new multi-task splitter.

Properties

Property Summary
string Description { get; }

Methods

Method Summary
DataSplitResult<T> Split(Matrix<T> X, Vector<T> y)