Type Definition opencv::types::PtrOfLogisticRegression  
source · [−]pub type PtrOfLogisticRegression = Ptr<dyn LogisticRegression>;Implementations
sourceimpl PtrOfLogisticRegression
 
impl PtrOfLogisticRegression
pub fn as_raw_PtrOfLogisticRegression(&self) -> *const c_void
pub fn as_raw_mut_PtrOfLogisticRegression(&mut self) -> *mut c_void
Trait Implementations
sourceimpl AlgorithmTraitConst for PtrOfLogisticRegression
 
impl AlgorithmTraitConst for PtrOfLogisticRegression
fn as_raw_Algorithm(&self) -> *const c_void
sourcefn write(&self, fs: &mut FileStorage) -> Result<()>
 
fn write(&self, fs: &mut FileStorage) -> Result<()>
Stores algorithm parameters in a file storage
sourcefn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
 
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
simplified API for language bindings Stores algorithm parameters in a file storage Read more
sourcefn empty(&self) -> Result<bool>
 
fn empty(&self) -> Result<bool>
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
sourcefn save(&self, filename: &str) -> Result<()>
 
fn save(&self, filename: &str) -> Result<()>
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more
sourcefn get_default_name(&self) -> Result<String>
 
fn get_default_name(&self) -> Result<String>
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string. Read more
sourceimpl LogisticRegression for PtrOfLogisticRegression
 
impl LogisticRegression for PtrOfLogisticRegression
fn as_raw_mut_LogisticRegression(&mut self) -> *mut c_void
sourcefn set_regularization(&mut self, val: i32) -> Result<()>
 
fn set_regularization(&mut self, val: i32) -> Result<()>
Kind of regularization to be applied. See LogisticRegression::RegKinds. Read more
sourcefn set_train_method(&mut self, val: i32) -> Result<()>
 
fn set_train_method(&mut self, val: i32) -> Result<()>
Kind of training method used. See LogisticRegression::Methods. Read more
sourcefn set_mini_batch_size(&mut self, val: i32) -> Result<()>
 
fn set_mini_batch_size(&mut self, val: i32) -> Result<()>
Specifies the number of training samples taken in each step of Mini-Batch Gradient Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It has to take values less than the total number of training samples. Read more
sourcefn set_term_criteria(&mut self, val: TermCriteria) -> Result<()>
 
fn set_term_criteria(&mut self, val: TermCriteria) -> Result<()>
Termination criteria of the algorithm. Read more
sourceimpl LogisticRegressionConst for PtrOfLogisticRegression
 
impl LogisticRegressionConst for PtrOfLogisticRegression
fn as_raw_LogisticRegression(&self) -> *const c_void
sourcefn get_learning_rate(&self) -> Result<f64>
 
fn get_learning_rate(&self) -> Result<f64>
Learning rate. Read more
sourcefn get_iterations(&self) -> Result<i32>
 
fn get_iterations(&self) -> Result<i32>
Number of iterations. Read more
sourcefn get_regularization(&self) -> Result<i32>
 
fn get_regularization(&self) -> Result<i32>
Kind of regularization to be applied. See LogisticRegression::RegKinds. Read more
sourcefn get_train_method(&self) -> Result<i32>
 
fn get_train_method(&self) -> Result<i32>
Kind of training method used. See LogisticRegression::Methods. Read more
sourcefn get_mini_batch_size(&self) -> Result<i32>
 
fn get_mini_batch_size(&self) -> Result<i32>
Specifies the number of training samples taken in each step of Mini-Batch Gradient Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It has to take values less than the total number of training samples. Read more
sourcefn get_term_criteria(&self) -> Result<TermCriteria>
 
fn get_term_criteria(&self) -> Result<TermCriteria>
Termination criteria of the algorithm. Read more
sourcefn predict(
    &self,
    samples: &dyn ToInputArray,
    results: &mut dyn ToOutputArray,
    flags: i32
) -> Result<f32>
 
fn predict(
    &self,
    samples: &dyn ToInputArray,
    results: &mut dyn ToOutputArray,
    flags: i32
) -> Result<f32>
Predicts responses for input samples and returns a float type. Read more
sourcefn get_learnt_thetas(&self) -> Result<Mat>
 
fn get_learnt_thetas(&self) -> Result<Mat>
This function returns the trained parameters arranged across rows. Read more
sourceimpl StatModel for PtrOfLogisticRegression
 
impl StatModel for PtrOfLogisticRegression
fn as_raw_mut_StatModel(&mut self) -> *mut c_void
sourcefn train_with_data(
    &mut self,
    train_data: &Ptr<dyn TrainData>,
    flags: i32
) -> Result<bool>
 
fn train_with_data(
    &mut self,
    train_data: &Ptr<dyn TrainData>,
    flags: i32
) -> Result<bool>
Trains the statistical model Read more
sourcefn train(
    &mut self,
    samples: &dyn ToInputArray,
    layout: i32,
    responses: &dyn ToInputArray
) -> Result<bool>
 
fn train(
    &mut self,
    samples: &dyn ToInputArray,
    layout: i32,
    responses: &dyn ToInputArray
) -> Result<bool>
Trains the statistical model Read more
sourceimpl StatModelConst for PtrOfLogisticRegression
 
impl StatModelConst for PtrOfLogisticRegression
fn as_raw_StatModel(&self) -> *const c_void
sourcefn get_var_count(&self) -> Result<i32>
 
fn get_var_count(&self) -> Result<i32>
Returns the number of variables in training samples
fn empty(&self) -> Result<bool>
sourcefn is_trained(&self) -> Result<bool>
 
fn is_trained(&self) -> Result<bool>
Returns true if the model is trained
sourcefn is_classifier(&self) -> Result<bool>
 
fn is_classifier(&self) -> Result<bool>
Returns true if the model is classifier
sourcefn calc_error(
    &self,
    data: &Ptr<dyn TrainData>,
    test: bool,
    resp: &mut dyn ToOutputArray
) -> Result<f32>
 
fn calc_error(
    &self,
    data: &Ptr<dyn TrainData>,
    test: bool,
    resp: &mut dyn ToOutputArray
) -> Result<f32>
Computes error on the training or test dataset Read more
sourcefn predict(
    &self,
    samples: &dyn ToInputArray,
    results: &mut dyn ToOutputArray,
    flags: i32
) -> Result<f32>
 
fn predict(
    &self,
    samples: &dyn ToInputArray,
    results: &mut dyn ToOutputArray,
    flags: i32
) -> Result<f32>
Predicts response(s) for the provided sample(s) Read more