IInputOutputDataLoader<T, TInput, TOutput>

Interfaces · AiDotNet.Interfaces

Interface for data loaders that provide standard input-output (X, Y) data for supervised learning.

Implements: IBatchIterable<ValueTuple<TInput, TOutput>>, IDataLoader<T>, IShuffleable

Known implementations: IFederatedClientDataLoader<T, TInput, TOutput>, InputOutputDataLoaderBase<T, TInput, TOutput>, StatefulDataLoader<T, TInput, TOutput>, TransformedDataLoader<T>

For Beginners

Most machine learning tasks fall into this pattern:

Example: House Price Prediction

  • X (inputs): Square footage, number of bedrooms, location, age
  • Y (outputs): The actual house price

Example: Email Spam Detection

  • X (inputs): Email text features (word counts, sender info, etc.)
  • Y (outputs): Label (spam=1, not spam=0)

The data loader loads this data from files, databases, or other sources and provides it in the format your model needs for training.

How It Works

This interface is for standard supervised learning scenarios where you have:

  • Input features (X): The data used to make predictions
  • Output labels (Y): The correct answers the model should learn to predict

Properties

Property Summary
TInput Features { get; } Gets all input features as a single data structure.
TOutput Labels { get; } Gets all output labels as a single data structure.
int FeatureCount { get; } Gets the number of features per sample.
int OutputDimension { get; } Gets the number of output dimensions (1 for regression/binary classification, N for multi-class with N classes).

Methods

Method Summary
ValueTuple<IInputOutputDataLoader<T, TInput, TOutput>, IInputOutputDataLoader<T, TInput, TOutput>, IInputOutputDataLoader<T, TInput, TOutput>> Split(double trainRatio, double validationRatio, int? seed) Creates a train/validation/test split of the data.