[−][src]Struct opencv::types::PtrOfSVM
Methods
impl PtrOfSVM
[src]
pub fn as_raw_PtrOfSVM(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[src]
Trait Implementations
impl Algorithm for PtrOfSVM
[src]
fn as_raw_Algorithm(&self) -> *mut c_void
[src]
fn clear(&mut self) -> Result<()>
[src]
Clears the algorithm state
fn empty(&self) -> Result<bool>
[src]
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
fn save(&self, filename: &str) -> Result<()>
[src]
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more
fn get_default_name(&self) -> Result<String>
[src]
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
impl SVM for PtrOfSVM
[src]
fn as_raw_SVM(&self) -> *mut c_void
[src]
fn get_type(&self) -> Result<i32>
[src]
@see setType
fn set_type(&mut self, val: i32) -> Result<()>
[src]
@copybrief getType @see getType
fn get_gamma(&self) -> Result<f64>
[src]
@see setGamma
fn set_gamma(&mut self, val: f64) -> Result<()>
[src]
@copybrief getGamma @see getGamma
fn get_coef0(&self) -> Result<f64>
[src]
@see setCoef0
fn set_coef0(&mut self, val: f64) -> Result<()>
[src]
@copybrief getCoef0 @see getCoef0
fn get_degree(&self) -> Result<f64>
[src]
@see setDegree
fn set_degree(&mut self, val: f64) -> Result<()>
[src]
@copybrief getDegree @see getDegree
fn get_c(&self) -> Result<f64>
[src]
@see setC
fn set_c(&mut self, val: f64) -> Result<()>
[src]
@copybrief getC @see getC
fn get_nu(&self) -> Result<f64>
[src]
@see setNu
fn set_nu(&mut self, val: f64) -> Result<()>
[src]
@copybrief getNu @see getNu
fn get_p(&self) -> Result<f64>
[src]
@see setP
fn set_p(&mut self, val: f64) -> Result<()>
[src]
@copybrief getP @see getP
fn get_class_weights(&self) -> Result<Mat>
[src]
@see setClassWeights
fn set_class_weights(&mut self, val: &Mat) -> Result<()>
[src]
@copybrief getClassWeights @see getClassWeights
fn get_term_criteria(&self) -> Result<TermCriteria>
[src]
@see setTermCriteria
fn set_term_criteria(&mut self, val: &TermCriteria) -> Result<()>
[src]
@copybrief getTermCriteria @see getTermCriteria
fn get_kernel_type(&self) -> Result<i32>
[src]
Type of a %SVM kernel. See SVM::KernelTypes. Default value is SVM::RBF. Read more
fn set_kernel(&mut self, kernel_type: i32) -> Result<()>
[src]
Initialize with one of predefined kernels. See SVM::KernelTypes. Read more
fn set_custom_kernel(&mut self, _kernel: &PtrOfKernel) -> Result<()>
[src]
Initialize with custom kernel. See SVM::Kernel class for implementation details Read more
fn train_auto(
&mut self,
data: &PtrOfTrainData,
k_fold: i32,
cgrid: &ParamGrid,
gamma_grid: &ParamGrid,
p_grid: &ParamGrid,
nu_grid: &ParamGrid,
coeff_grid: &ParamGrid,
degree_grid: &ParamGrid,
balanced: bool
) -> Result<bool>
[src]
&mut self,
data: &PtrOfTrainData,
k_fold: i32,
cgrid: &ParamGrid,
gamma_grid: &ParamGrid,
p_grid: &ParamGrid,
nu_grid: &ParamGrid,
coeff_grid: &ParamGrid,
degree_grid: &ParamGrid,
balanced: bool
) -> Result<bool>
Trains an %SVM with optimal parameters. Read more
fn train_auto_1(
&mut self,
samples: &Mat,
layout: i32,
responses: &Mat,
k_fold: i32,
cgrid: &PtrOfParamGrid,
gamma_grid: &PtrOfParamGrid,
p_grid: &PtrOfParamGrid,
nu_grid: &PtrOfParamGrid,
coeff_grid: &PtrOfParamGrid,
degree_grid: &PtrOfParamGrid,
balanced: bool
) -> Result<bool>
[src]
&mut self,
samples: &Mat,
layout: i32,
responses: &Mat,
k_fold: i32,
cgrid: &PtrOfParamGrid,
gamma_grid: &PtrOfParamGrid,
p_grid: &PtrOfParamGrid,
nu_grid: &PtrOfParamGrid,
coeff_grid: &PtrOfParamGrid,
degree_grid: &PtrOfParamGrid,
balanced: bool
) -> Result<bool>
Trains an %SVM with optimal parameters Read more
fn get_support_vectors(&self) -> Result<Mat>
[src]
Retrieves all the support vectors Read more
fn get_uncompressed_support_vectors(&self) -> Result<Mat>
[src]
Retrieves all the uncompressed support vectors of a linear %SVM Read more
fn get_decision_function(
&self,
i: i32,
alpha: &mut Mat,
svidx: &mut Mat
) -> Result<f64>
[src]
&self,
i: i32,
alpha: &mut Mat,
svidx: &mut Mat
) -> Result<f64>
Retrieves the decision function Read more
impl StatModel for PtrOfSVM
[src]
fn as_raw_StatModel(&self) -> *mut c_void
[src]
fn get_var_count(&self) -> Result<i32>
[src]
Returns the number of variables in training samples
fn empty(&self) -> Result<bool>
[src]
fn is_trained(&self) -> Result<bool>
[src]
Returns true if the model is trained
fn is_classifier(&self) -> Result<bool>
[src]
Returns true if the model is classifier
fn train_with_data(
&mut self,
train_data: &PtrOfTrainData,
flags: i32
) -> Result<bool>
[src]
&mut self,
train_data: &PtrOfTrainData,
flags: i32
) -> Result<bool>
Trains the statistical model Read more
fn train(&mut self, samples: &Mat, layout: i32, responses: &Mat) -> Result<bool>
[src]
Trains the statistical model Read more
fn calc_error(
&self,
data: &PtrOfTrainData,
test: bool,
resp: &mut Mat
) -> Result<f32>
[src]
&self,
data: &PtrOfTrainData,
test: bool,
resp: &mut Mat
) -> Result<f32>
Computes error on the training or test dataset Read more
fn predict(&self, samples: &Mat, results: &mut Mat, flags: i32) -> Result<f32>
[src]
Predicts response(s) for the provided sample(s) Read more
impl Send for PtrOfSVM
[src]
impl Drop for PtrOfSVM
[src]
Auto Trait Implementations
impl Unpin for PtrOfSVM
impl !Sync for PtrOfSVM
impl RefUnwindSafe for PtrOfSVM
impl UnwindSafe for PtrOfSVM
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,