pub struct Model { /* private fields */ }Implementations§
Source§impl Model
impl Model
Sourcepub fn load<P: AsRef<Path>>(path: P) -> CatBoostResult<Self>
pub fn load<P: AsRef<Path>>(path: P) -> CatBoostResult<Self>
Load a model from a file
Sourcepub fn load_buffer<P: AsRef<Vec<u8>>>(buffer: P) -> CatBoostResult<Self>
pub fn load_buffer<P: AsRef<Vec<u8>>>(buffer: P) -> CatBoostResult<Self>
Load a model from a buffer
Sourcepub fn calc_model_prediction(
&self,
float_features: Vec<Vec<f32>>,
cat_features: Vec<Vec<String>>,
) -> CatBoostResult<Vec<f64>>
pub fn calc_model_prediction( &self, float_features: Vec<Vec<f32>>, cat_features: Vec<Vec<String>>, ) -> CatBoostResult<Vec<f64>>
Calculate raw model predictions on float features and string categorical feature values
Sourcepub fn calc_predict_proba(
&self,
float_features: Vec<Vec<f32>>,
cat_features: Vec<Vec<String>>,
) -> CatBoostResult<Vec<f64>>
pub fn calc_predict_proba( &self, float_features: Vec<Vec<f32>>, cat_features: Vec<Vec<String>>, ) -> CatBoostResult<Vec<f64>>
Apply sigmoid to get predict probability
Sourcepub fn get_float_features_count(&self) -> usize
pub fn get_float_features_count(&self) -> usize
Get expected float feature count for model
Sourcepub fn get_cat_features_count(&self) -> usize
pub fn get_cat_features_count(&self) -> usize
Get expected categorical feature count for model
Sourcepub fn get_tree_count(&self) -> usize
pub fn get_tree_count(&self) -> usize
Get number of trees in model
Sourcepub fn get_dimensions_count(&self) -> usize
pub fn get_dimensions_count(&self) -> usize
Get number of dimensions in model
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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