# typed: strict
# frozen_string_literal: true

module Stats
  # Immutable struct representing training and evaluation data split
  class TrainTestSplit < T::ImmutableStruct
    extend T::Sig

    const :training_records, T::Array[Stats::DataPoint]
    const :evaluation_records, T::Array[Stats::DataPoint]

    sig { returns(Integer) }
    def training_count
      training_records.length
    end

    sig { returns(Integer) }
    def evaluation_count
      evaluation_records.length
    end

    sig { returns(Integer) }
    def total_count
      training_count + evaluation_count
    end

    sig { returns(String) }
    def summary
      "📊 Split data: #{training_count} training, #{evaluation_count} evaluation records"
    end
  end
end
