#[repr(C, align(4))]pub struct EnsembleHeader {
pub magic: u32,
pub version: u16,
pub n_trees: u16,
pub n_features: u16,
pub _reserved: u16,
pub base_prediction: f32,
}Expand description
Header for the packed ensemble binary format. 16 bytes, 4-byte aligned.
Appears at the start of every packed binary. Followed by n_trees TreeEntry
records and then contiguous PackedNode arrays.
Fields§
§magic: u32Magic bytes: "IRIT" in ASCII (little-endian u32: 0x54495249).
version: u16Binary format version. Currently 1.
n_trees: u16Number of trees in the ensemble.
n_features: u16Expected number of input features.
_reserved: u16Reserved padding.
base_prediction: f32Base prediction (f64 quantized to f32). Added to the sum of tree predictions.
Implementations§
Trait Implementations§
Source§impl Clone for EnsembleHeader
impl Clone for EnsembleHeader
Source§fn clone(&self) -> EnsembleHeader
fn clone(&self) -> EnsembleHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnsembleHeader
impl Debug for EnsembleHeader
Source§impl PartialEq for EnsembleHeader
impl PartialEq for EnsembleHeader
impl Copy for EnsembleHeader
impl StructuralPartialEq for EnsembleHeader
Auto Trait Implementations§
impl Freeze for EnsembleHeader
impl RefUnwindSafe for EnsembleHeader
impl Send for EnsembleHeader
impl Sync for EnsembleHeader
impl Unpin for EnsembleHeader
impl UnsafeUnpin for EnsembleHeader
impl UnwindSafe for EnsembleHeader
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