Type Definition opencv::types::PtrOfSVMSGD
source · [−]Implementations
sourceimpl PtrOfSVMSGD
impl PtrOfSVMSGD
pub fn as_raw_PtrOfSVMSGD(&self) -> *const c_void
pub fn as_raw_mut_PtrOfSVMSGD(&mut self) -> *mut c_void
Trait Implementations
sourceimpl AlgorithmTrait for PtrOfSVMSGD
impl AlgorithmTrait for PtrOfSVMSGD
sourceimpl AlgorithmTraitConst for PtrOfSVMSGD
impl AlgorithmTraitConst for PtrOfSVMSGD
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 SVMSGD for PtrOfSVMSGD
impl SVMSGD for PtrOfSVMSGD
fn as_raw_mut_SVMSGD(&mut self) -> *mut c_void
sourcefn get_weights(&mut self) -> Result<Mat>
fn get_weights(&mut self) -> Result<Mat>
Returns Read more
sourcefn set_optimal_parameters(
&mut self,
svmsgd_type: i32,
margin_type: i32
) -> Result<()>
fn set_optimal_parameters(
&mut self,
svmsgd_type: i32,
margin_type: i32
) -> Result<()>
Function sets optimal parameters values for chosen SVM SGD model. Read more
sourcefn set_svmsgd_type(&mut self, svmsgd_type: i32) -> Result<()>
fn set_svmsgd_type(&mut self, svmsgd_type: i32) -> Result<()>
%Algorithm type, one of SVMSGD::SvmsgdType. Read more
sourcefn set_margin_type(&mut self, margin_type: i32) -> Result<()>
fn set_margin_type(&mut self, margin_type: i32) -> Result<()>
%Margin type, one of SVMSGD::MarginType. Read more
sourcefn set_margin_regularization(&mut self, margin_regularization: f32) -> Result<()>
fn set_margin_regularization(&mut self, margin_regularization: f32) -> Result<()>
Parameter marginRegularization of a %SVMSGD optimization problem. Read more
sourcefn set_initial_step_size(&mut self, initial_step_size: f32) -> Result<()>
fn set_initial_step_size(&mut self, initial_step_size: f32) -> Result<()>
Parameter initialStepSize of a %SVMSGD optimization problem. Read more
sourcefn set_step_decreasing_power(&mut self, step_decreasing_power: f32) -> Result<()>
fn set_step_decreasing_power(&mut self, step_decreasing_power: f32) -> Result<()>
Parameter stepDecreasingPower of a %SVMSGD optimization problem. Read more
sourcefn set_term_criteria(&mut self, val: TermCriteria) -> Result<()>
fn set_term_criteria(&mut self, val: TermCriteria) -> Result<()>
Termination criteria of the training algorithm.
You can specify the maximum number of iterations (maxCount) and/or how much the error could
change between the iterations to make the algorithm continue (epsilon). Read more
sourceimpl SVMSGDConst for PtrOfSVMSGD
impl SVMSGDConst for PtrOfSVMSGD
fn as_raw_SVMSGD(&self) -> *const c_void
sourcefn get_svmsgd_type(&self) -> Result<i32>
fn get_svmsgd_type(&self) -> Result<i32>
%Algorithm type, one of SVMSGD::SvmsgdType. Read more
sourcefn get_margin_type(&self) -> Result<i32>
fn get_margin_type(&self) -> Result<i32>
%Margin type, one of SVMSGD::MarginType. Read more
sourcefn get_margin_regularization(&self) -> Result<f32>
fn get_margin_regularization(&self) -> Result<f32>
Parameter marginRegularization of a %SVMSGD optimization problem. Read more
sourcefn get_initial_step_size(&self) -> Result<f32>
fn get_initial_step_size(&self) -> Result<f32>
Parameter initialStepSize of a %SVMSGD optimization problem. Read more
sourcefn get_step_decreasing_power(&self) -> Result<f32>
fn get_step_decreasing_power(&self) -> Result<f32>
Parameter stepDecreasingPower of a %SVMSGD optimization problem. Read more
sourcefn get_term_criteria(&self) -> Result<TermCriteria>
fn get_term_criteria(&self) -> Result<TermCriteria>
Termination criteria of the training algorithm.
You can specify the maximum number of iterations (maxCount) and/or how much the error could
change between the iterations to make the algorithm continue (epsilon). Read more
sourceimpl StatModel for PtrOfSVMSGD
impl StatModel for PtrOfSVMSGD
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 PtrOfSVMSGD
impl StatModelConst for PtrOfSVMSGD
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