pub struct DataSet<T> { /* private fields */ }Implementations§
Source§impl<T> DataSet<T>
impl<T> DataSet<T>
pub fn new() -> Self
pub fn from_samples(samples: Vec<Row<T>>) -> Self
pub fn from_vecs(inputs: Vec<Vec<T>>, outputs: Vec<Vec<T>>) -> Self
pub fn add_sample(&mut self, input: Vec<T>, output: Vec<T>)
pub fn get_sample(&self, index: usize) -> Option<&Row<T>>
pub fn get_samples(&self) -> &[Row<T>]
pub fn get_samples_mut(&mut self) -> &mut [Row<T>]
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DataSet<T>
impl<T> RefUnwindSafe for DataSet<T>where
T: RefUnwindSafe,
impl<T> Send for DataSet<T>where
T: Send,
impl<T> Sync for DataSet<T>where
T: Sync,
impl<T> Unpin for DataSet<T>where
T: Unpin,
impl<T> UnwindSafe for DataSet<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more