Skip to main content

TTVSplit

Trait TTVSplit 

Source
pub trait TTVSplit<T>: Iterator<Item = T> + Sized {
    // Required method
    fn split_ttv(self, splits: [f32; 3]) -> TTVIterator<T, Self>;
}
Expand description

An iterator type to generate train/test/validaton splits from a data stream of unknown lenght.

It is the same as PartsSplit but with a fixed size of 3 (it uses arrays instead of vectors).

See the examples on the repository for both iterator traits.

Required Methods§

Source

fn split_ttv(self, splits: [f32; 3]) -> TTVIterator<T, Self>

splits contains weights that are not required to sum up to 1.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T, I> TTVSplit<T> for I
where I: Iterator<Item = T>,