[−][src]Struct opencv::types::PtrOfANN_MLP
Methods
impl PtrOfANN_MLP
[src]
pub fn as_raw_PtrOfANN_MLP(&self) -> *mut c_void
[src]
pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self
[src]
Trait Implementations
impl Algorithm for PtrOfANN_MLP
[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 ANN_MLP for PtrOfANN_MLP
[src]
fn as_raw_ANN_MLP(&self) -> *mut c_void
[src]
fn set_train_method(
&mut self,
method: i32,
param1: f64,
param2: f64
) -> Result<()>
[src]
&mut self,
method: i32,
param1: f64,
param2: f64
) -> Result<()>
Sets training method and common parameters. ## Parameters * method: Default value is ANN_MLP::RPROP. See ANN_MLP::TrainingMethods. * param1: passed to setRpropDW0 for ANN_MLP::RPROP and to setBackpropWeightScale for ANN_MLP::BACKPROP and to initialT for ANN_MLP::ANNEAL. * param2: passed to setRpropDWMin for ANN_MLP::RPROP and to setBackpropMomentumScale for ANN_MLP::BACKPROP and to finalT for ANN_MLP::ANNEAL. Read more
fn get_train_method(&self) -> Result<i32>
[src]
Returns current training method
fn set_activation_function(
&mut self,
_type: i32,
param1: f64,
param2: f64
) -> Result<()>
[src]
&mut self,
_type: i32,
param1: f64,
param2: f64
) -> Result<()>
Initialize the activation function for each neuron. Currently the default and the only fully supported activation function is ANN_MLP::SIGMOID_SYM. ## Parameters * type: The type of activation function. See ANN_MLP::ActivationFunctions. * param1: The first parameter of the activation function, inline formula. Default value is 0. * param2: The second parameter of the activation function, inline formula. Default value is 0. Read more
fn set_layer_sizes(&mut self, _layer_sizes: &Mat) -> Result<()>
[src]
Integer vector specifying the number of neurons in each layer including the input and output layers. The very first element specifies the number of elements in the input layer. The last element - number of elements in the output layer. Default value is empty Mat. ## See also getLayerSizes Read more
fn get_layer_sizes(&self) -> Result<Mat>
[src]
Integer vector specifying the number of neurons in each layer including the input and output layers. The very first element specifies the number of elements in the input layer. The last element - number of elements in the output layer. ## See also setLayerSizes Read more
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_backprop_weight_scale(&self) -> Result<f64>
[src]
@see setBackpropWeightScale
fn set_backprop_weight_scale(&mut self, val: f64) -> Result<()>
[src]
@copybrief getBackpropWeightScale @see getBackpropWeightScale
fn get_backprop_momentum_scale(&self) -> Result<f64>
[src]
@see setBackpropMomentumScale
fn set_backprop_momentum_scale(&mut self, val: f64) -> Result<()>
[src]
@copybrief getBackpropMomentumScale @see getBackpropMomentumScale
fn get_rprop_dw0(&self) -> Result<f64>
[src]
@see setRpropDW0
fn set_rprop_dw0(&mut self, val: f64) -> Result<()>
[src]
@copybrief getRpropDW0 @see getRpropDW0
fn get_rprop_dw_plus(&self) -> Result<f64>
[src]
@see setRpropDWPlus
fn set_rprop_dw_plus(&mut self, val: f64) -> Result<()>
[src]
@copybrief getRpropDWPlus @see getRpropDWPlus
fn get_rprop_dw_minus(&self) -> Result<f64>
[src]
@see setRpropDWMinus
fn set_rprop_dw_minus(&mut self, val: f64) -> Result<()>
[src]
@copybrief getRpropDWMinus @see getRpropDWMinus
fn get_rprop_dw_min(&self) -> Result<f64>
[src]
@see setRpropDWMin
fn set_rprop_dw_min(&mut self, val: f64) -> Result<()>
[src]
@copybrief getRpropDWMin @see getRpropDWMin
fn get_rprop_dw_max(&self) -> Result<f64>
[src]
@see setRpropDWMax
fn set_rprop_dw_max(&mut self, val: f64) -> Result<()>
[src]
@copybrief getRpropDWMax @see getRpropDWMax
fn get_anneal_initial_t(&self) -> Result<f64>
[src]
@see setAnnealInitialT
fn set_anneal_initial_t(&mut self, val: f64) -> Result<()>
[src]
@copybrief getAnnealInitialT @see getAnnealInitialT
fn get_anneal_final_t(&self) -> Result<f64>
[src]
@see setAnnealFinalT
fn set_anneal_final_t(&mut self, val: f64) -> Result<()>
[src]
@copybrief getAnnealFinalT @see getAnnealFinalT
fn get_anneal_cooling_ratio(&self) -> Result<f64>
[src]
@see setAnnealCoolingRatio
fn set_anneal_cooling_ratio(&mut self, val: f64) -> Result<()>
[src]
@copybrief getAnnealCoolingRatio @see getAnnealCoolingRatio
fn get_anneal_ite_per_step(&self) -> Result<i32>
[src]
@see setAnnealItePerStep
fn set_anneal_ite_per_step(&mut self, val: i32) -> Result<()>
[src]
@copybrief getAnnealItePerStep @see getAnnealItePerStep
fn get_weights(&self, layer_idx: i32) -> Result<Mat>
[src]
impl StatModel for PtrOfANN_MLP
[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 PtrOfANN_MLP
[src]
impl Drop for PtrOfANN_MLP
[src]
Auto Trait Implementations
impl Unpin for PtrOfANN_MLP
impl !Sync for PtrOfANN_MLP
impl UnwindSafe for PtrOfANN_MLP
impl RefUnwindSafe for PtrOfANN_MLP
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,