[−][src]Trait opencv::ml::prelude::NormalBayesClassifier
Required methods
pub fn as_raw_NormalBayesClassifier(&self) -> *const c_void
[src]
pub fn as_raw_mut_NormalBayesClassifier(&mut self) -> *mut c_void
[src]
Provided methods
pub fn predict_prob(
&self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
output_probs: &mut dyn ToOutputArray,
flags: i32
) -> Result<f32>
[src]
&self,
inputs: &dyn ToInputArray,
outputs: &mut dyn ToOutputArray,
output_probs: &mut dyn ToOutputArray,
flags: i32
) -> Result<f32>
Predicts the response for sample(s).
The method estimates the most probable classes for input vectors. Input vectors (one or more) are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one output vector outputs. The predicted class for a single input vector is returned by the method. The vector outputProbs contains the output probabilities corresponding to each element of result.
C++ default parameters
- flags: 0
Implementations
impl<'_> dyn NormalBayesClassifier + '_
[src]
pub fn create() -> Result<Ptr<dyn NormalBayesClassifier>>
[src]
Creates empty model Use StatModel::train to train the model after creation.
pub fn load(
filepath: &str,
node_name: &str
) -> Result<Ptr<dyn NormalBayesClassifier>>
[src]
filepath: &str,
node_name: &str
) -> Result<Ptr<dyn NormalBayesClassifier>>
Loads and creates a serialized NormalBayesClassifier from a file
Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk. Load the NormalBayesClassifier from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
Parameters
- filepath: path to serialized NormalBayesClassifier
- nodeName: name of node containing the classifier
C++ default parameters
- node_name: String()