pub struct TrainingParameters<'a> { /* private fields */ }
Expand description
Parameters used by the Booster::train
method for training new models.
Created using TrainingParametersBuilder
.
Implementations§
Source§impl<'a> TrainingParameters<'a>
impl<'a> TrainingParameters<'a>
pub fn dtrain(&self) -> &'a DMatrix
pub fn set_dtrain(&mut self, dtrain: &'a DMatrix)
pub fn boost_rounds(&self) -> u32
pub fn set_boost_rounds(&mut self, boost_rounds: u32)
pub fn booster_params(&self) -> &BoosterParameters
pub fn set_booster_params<T: Into<BoosterParameters>>( &mut self, booster_params: T, )
pub fn evaluation_sets(&self) -> Option<&'a [(&'a DMatrix, &'a str)]>
pub fn set_evaluation_sets( &mut self, evaluation_sets: Option<&'a [(&'a DMatrix, &'a str)]>, )
pub fn custom_objective_fn( &self, ) -> &Option<fn(&[f32], &DMatrix) -> (Vec<f32>, Vec<f32>)>
pub fn set_custom_objective_fn( &mut self, custom_objective_fn: Option<fn(&[f32], &DMatrix) -> (Vec<f32>, Vec<f32>)>, )
pub fn custom_evaluation_fn(&self) -> &Option<fn(&[f32], &DMatrix) -> f32>
pub fn set_custom_evaluation_fn( &mut self, custom_evaluation_fn: Option<fn(&[f32], &DMatrix) -> f32>, )
Trait Implementations§
Source§impl<'a> Clone for TrainingParameters<'a>
impl<'a> Clone for TrainingParameters<'a>
Source§fn clone(&self) -> TrainingParameters<'a>
fn clone(&self) -> TrainingParameters<'a>
Returns a copy 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 moreAuto Trait Implementations§
impl<'a> Freeze for TrainingParameters<'a>
impl<'a> RefUnwindSafe for TrainingParameters<'a>
impl<'a> Send for TrainingParameters<'a>
impl<'a> Sync for TrainingParameters<'a>
impl<'a> Unpin for TrainingParameters<'a>
impl<'a> UnwindSafe for TrainingParameters<'a>
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