pub struct Dataset<XT: Number, YT: TargetValue> {
pub x: DMatrix<XT>,
pub y: DVector<YT>,
}Fields§
§x: DMatrix<XT>§y: DVector<YT>Implementations§
source§impl<XT: Number, YT: TargetValue> Dataset<XT, YT>
impl<XT: Number, YT: TargetValue> Dataset<XT, YT>
pub fn new(x: DMatrix<XT>, y: DVector<YT>) -> Self
pub fn into_parts(&self) -> (&DMatrix<XT>, &DVector<YT>)
pub fn is_not_empty(&self) -> bool
pub fn nrows(&self) -> usize
pub fn standardize(&mut self)where
XT: RealNumber,
pub fn train_test_split( &self, train_size: f64, seed: Option<u64> ) -> Result<(Self, Self), Box<dyn Error>>
pub fn split_on_threshold( &self, feature_index: usize, threshold: XT ) -> (Self, Self)
pub fn samples(&self, sample_size: usize, seed: Option<u64>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<XT, YT> RefUnwindSafe for Dataset<XT, YT>where
XT: RefUnwindSafe,
YT: RefUnwindSafe,
impl<XT, YT> Send for Dataset<XT, YT>
impl<XT, YT> Sync for Dataset<XT, YT>
impl<XT, YT> Unpin for Dataset<XT, YT>
impl<XT, YT> UnwindSafe for Dataset<XT, YT>where
XT: UnwindSafe,
YT: 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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.