pub trait Boost: BoostConst + DTrees {
// Required method
fn as_raw_mut_Boost(&mut self) -> *mut c_void;
// Provided methods
fn set_boost_type(&mut self, val: i32) -> Result<()> { ... }
fn set_weak_count(&mut self, val: i32) -> Result<()> { ... }
fn set_weight_trim_rate(&mut self, val: f64) -> Result<()> { ... }
}
Expand description
Required Methods§
fn as_raw_mut_Boost(&mut self) -> *mut c_void
Provided Methods§
sourcefn set_boost_type(&mut self, val: i32) -> Result<()>
fn set_boost_type(&mut self, val: i32) -> Result<()>
Type of the boosting algorithm. See Boost::Types. Default value is Boost::REAL.
See also
setBoostType getBoostType
sourcefn set_weak_count(&mut self, val: i32) -> Result<()>
fn set_weak_count(&mut self, val: i32) -> Result<()>
sourcefn set_weight_trim_rate(&mut self, val: f64) -> Result<()>
fn set_weight_trim_rate(&mut self, val: f64) -> Result<()>
A threshold between 0 and 1 used to save computational time.
Samples with summary weight do not participate in the next
iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95.
See also
setWeightTrimRate getWeightTrimRate
Implementations§
source§impl dyn Boost + '_
impl dyn Boost + '_
sourcepub fn create() -> Result<Ptr<dyn Boost>>
pub fn create() -> Result<Ptr<dyn Boost>>
Creates the empty model. Use StatModel::train to train the model, Algorithm::load<Boost>(filename) to load the pre-trained model.
sourcepub fn load(filepath: &str, node_name: &str) -> Result<Ptr<dyn Boost>>
pub fn load(filepath: &str, node_name: &str) -> Result<Ptr<dyn Boost>>
Loads and creates a serialized Boost from a file
Use Boost::save to serialize and store an RTree to disk. Load the Boost from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
Parameters
- filepath: path to serialized Boost
- nodeName: name of node containing the classifier
C++ default parameters
- node_name: String()