pub struct ModelState {
pub config: SGBTConfig,
pub loss_type: LossType,
pub base_prediction: f64,
pub base_initialized: bool,
pub initial_targets: Vec<f64>,
pub initial_target_count: usize,
pub samples_seen: u64,
pub rng_state: u64,
pub steps: Vec<StepSnapshot>,
}Expand description
Complete serializable state of an SGBT model.
Captures everything needed to reconstruct a trained model for prediction
and continued training. The loss function is stored as a LossType tag.
Fields§
§config: SGBTConfig§loss_type: LossType§base_prediction: f64§base_initialized: bool§initial_targets: Vec<f64>§initial_target_count: usize§samples_seen: u64§rng_state: u64§steps: Vec<StepSnapshot>Trait Implementations§
Source§impl Clone for ModelState
impl Clone for ModelState
Source§fn clone(&self) -> ModelState
fn clone(&self) -> ModelState
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 ModelState
impl Debug for ModelState
Source§impl<'de> Deserialize<'de> for ModelState
impl<'de> Deserialize<'de> for ModelState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelState
impl RefUnwindSafe for ModelState
impl Send for ModelState
impl Sync for ModelState
impl Unpin for ModelState
impl UnsafeUnpin for ModelState
impl UnwindSafe for ModelState
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