TemporalSpatialSplitter<T>

Models & Types ยท AiDotNet.Preprocessing.DataPreparation.Splitting.DomainSpecific

Combined temporal-spatial splitter for data with both time and location dimensions.

Inheritance: DataSplitterBase<T> โ†’ TemporalSpatialSplitter<T>

For Beginners

Some data has both time and space components, like:

  • Weather observations over time at different locations
  • Traffic patterns at intersections over days
  • Disease spread tracking

How It Works

This splitter considers both dimensions to prevent leakage from nearby times AND places.

Modes:

  • Time-first: Split by time, then spatially within time periods
  • Space-first: Split by location, then temporally within regions
  • Combined: Use a weighted distance combining both

Constructors

Constructor Summary
TemporalSpatialSplitter(double testSize, double temporalWeight, double spatialWeight, int timeColumn, int xColumn, int yColumn, int randomSeed) Creates a new temporal-spatial splitter.

Properties

Property Summary
string Description { get; }

Methods

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