pub struct BinnedDataset {
pub num_rows: usize,
pub row_offset: u64,
pub features: Vec<FeatureMeta>,
pub groups: Vec<FeatureGroup>,
pub total_bins: usize,
pub label: Vec<f32>,
pub weight: Option<Vec<f32>>,
pub query_boundaries: Option<Vec<u32>>,
}Fields§
§num_rows: usize§row_offset: u64Global id of local row 0: rows of lower ranks come first. Keys the random draws of quantization and bagging.
features: Vec<FeatureMeta>Every input feature in input order, trivial ones included.
groups: Vec<FeatureGroup>§total_bins: usize§label: Vec<f32>§weight: Option<Vec<f32>>§query_boundaries: Option<Vec<u32>>num_queries + 1 row boundaries; queries are contiguous runs of rows.
Implementations§
Source§impl BinnedDataset
impl BinnedDataset
Sourcepub fn construct(
input: &DatasetInput<'_>,
params: &Params,
collective: &mut dyn Collective,
) -> Result<Self>
pub fn construct( input: &DatasetInput<'_>, params: &Params, collective: &mut dyn Collective, ) -> Result<Self>
Bins a training set. Bin mappers come from a sample of bin_construct_sample_cnt rows over every rank
(allgathered), so every rank builds identical mappers; row_offset is the rows of lower ranks.
Sourcepub fn construct_with_reference(
input: &DatasetInput<'_>,
reference: &BinnedDataset,
collective: &mut dyn Collective,
) -> Result<Self>
pub fn construct_with_reference( input: &DatasetInput<'_>, reference: &BinnedDataset, collective: &mut dyn Collective, ) -> Result<Self>
Bins a validation set with reference’s mappers and group layout; feature names and categorical
declarations come from reference.
Trait Implementations§
Source§impl Clone for BinnedDataset
impl Clone for BinnedDataset
Source§impl Debug for BinnedDataset
impl Debug for BinnedDataset
Source§impl PartialEq for BinnedDataset
impl PartialEq for BinnedDataset
impl StructuralPartialEq for BinnedDataset
Auto Trait Implementations§
impl Forget for BinnedDataset
impl Freeze for BinnedDataset
impl Move for BinnedDataset
impl RefUnwindSafe for BinnedDataset
impl Send for BinnedDataset
impl Sync for BinnedDataset
impl Unpin for BinnedDataset
impl UnsafeUnpin for BinnedDataset
impl UnwindSafe for BinnedDataset
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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