pub struct OptimizedModel { /* private fields */ }Implementations§
Source§impl OptimizedModel
impl OptimizedModel
pub fn predict_table(&self, table: &dyn TableAccess) -> Vec<f64>
pub fn predict_rows( &self, rows: Vec<Vec<f64>>, ) -> Result<Vec<f64>, PredictError>
pub fn predict_named_columns( &self, columns: BTreeMap<String, Vec<f64>>, ) -> Result<Vec<f64>, PredictError>
pub fn predict_proba_table( &self, table: &dyn TableAccess, ) -> Result<Vec<Vec<f64>>, PredictError>
pub fn predict_proba_rows( &self, rows: Vec<Vec<f64>>, ) -> Result<Vec<Vec<f64>>, PredictError>
pub fn predict_proba_named_columns( &self, columns: BTreeMap<String, Vec<f64>>, ) -> Result<Vec<Vec<f64>>, PredictError>
pub fn predict_proba_sparse_binary_columns( &self, n_rows: usize, n_features: usize, columns: Vec<Vec<usize>>, ) -> Result<Vec<Vec<f64>>, PredictError>
pub fn predict_sparse_binary_columns( &self, n_rows: usize, n_features: usize, columns: Vec<Vec<usize>>, ) -> Result<Vec<f64>, PredictError>
pub fn algorithm(&self) -> TrainAlgorithm
pub fn task(&self) -> Task
pub fn criterion(&self) -> Criterion
pub fn tree_type(&self) -> TreeType
pub fn mean_value(&self) -> Option<f64>
pub fn canaries(&self) -> usize
pub fn max_depth(&self) -> Option<usize>
pub fn min_samples_split(&self) -> Option<usize>
pub fn min_samples_leaf(&self) -> Option<usize>
pub fn n_trees(&self) -> Option<usize>
pub fn max_features(&self) -> Option<usize>
pub fn seed(&self) -> Option<u64>
pub fn compute_oob(&self) -> bool
pub fn oob_score(&self) -> Option<f64>
pub fn learning_rate(&self) -> Option<f64>
pub fn bootstrap(&self) -> bool
pub fn top_gradient_fraction(&self) -> Option<f64>
pub fn other_gradient_fraction(&self) -> Option<f64>
pub fn tree_count(&self) -> usize
pub fn tree_structure( &self, tree_index: usize, ) -> Result<TreeStructureSummary, IntrospectionError>
pub fn tree_prediction_stats( &self, tree_index: usize, ) -> Result<PredictionValueStats, IntrospectionError>
pub fn tree_node( &self, tree_index: usize, node_index: usize, ) -> Result<NodeTreeNode, IntrospectionError>
pub fn tree_level( &self, tree_index: usize, level_index: usize, ) -> Result<ObliviousLevel, IntrospectionError>
pub fn tree_leaf( &self, tree_index: usize, leaf_index: usize, ) -> Result<IndexedLeaf, IntrospectionError>
pub fn to_ir(&self) -> ModelPackageIr
pub fn to_ir_json(&self) -> Result<String, Error>
pub fn to_ir_json_pretty(&self) -> Result<String, Error>
pub fn serialize(&self) -> Result<String, Error>
pub fn serialize_pretty(&self) -> Result<String, Error>
pub fn serialize_compiled(&self) -> Result<Vec<u8>, CompiledArtifactError>
pub fn deserialize_compiled( serialized: &[u8], physical_cores: Option<usize>, ) -> Result<Self, CompiledArtifactError>
Trait Implementations§
Source§impl Clone for OptimizedModel
impl Clone for OptimizedModel
Source§fn clone(&self) -> OptimizedModel
fn clone(&self) -> OptimizedModel
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 moreAuto Trait Implementations§
impl Freeze for OptimizedModel
impl !RefUnwindSafe for OptimizedModel
impl Send for OptimizedModel
impl Sync for OptimizedModel
impl Unpin for OptimizedModel
impl UnsafeUnpin for OptimizedModel
impl !UnwindSafe for OptimizedModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more