Sha256: ee24250bdb88d3b1525a06baf6f8ab11ca14cc359e48cdd6048817061ab8323a
Contents?: true
Size: 534 Bytes
Versions: 51
Compression:
Stored size: 534 Bytes
Contents
module EasyML module Splitters class BaseSplitter include ActiveModel::Validations include EasyML::Concerns::Configurable attr_reader :splitter def split(datasource, &block) datasource.in_batches do |df| split_df(df).tap do |splits| yield splits if block_given? end end end def split_df(df) df end def initialize(splitter) @splitter = splitter end delegate :dataset, to: :splitter end end end
Version data entries
51 entries across 51 versions & 1 rubygems