Class NormalBayesClassifier
Bayes classifier for normally distributed data
Inheritance
Implements
Inherited Members
Namespace: OpenCvSharp.ML
Assembly: OpenCvSharp.dll
Syntax
public class NormalBayesClassifier : StatModel, ICvPtrHolder
Constructors
| Improve this Doc View SourceNormalBayesClassifier(IntPtr)
Creates instance by raw pointer cv::ml::NormalBayesClassifier*
Declaration
protected NormalBayesClassifier(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | p |
Methods
| Improve this Doc View SourceCreate()
Creates empty model. Use StatModel::train to train the model after creation.
Declaration
public static NormalBayesClassifier Create()
Returns
Type | Description |
---|---|
NormalBayesClassifier |
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
| Improve this Doc View SourceLoad(String)
Loads and creates a serialized model from a file.
Declaration
public static NormalBayesClassifier Load(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
NormalBayesClassifier |
LoadFromString(String)
Loads algorithm from a String.
Declaration
public static NormalBayesClassifier LoadFromString(string strModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | strModel | he string variable containing the model you want to load. |
Returns
Type | Description |
---|---|
NormalBayesClassifier |
PredictProb(InputArray, OutputArray, OutputArray, Int32)
Predicts the response for sample(s).
Declaration
public float PredictProb(InputArray inputs, OutputArray outputs, OutputArray outputProbs, int flags = 0)
Parameters
Type | Name | Description |
---|---|---|
InputArray | inputs | |
OutputArray | outputs | |
OutputArray | outputProbs | |
System.Int32 | flags |
Returns
Type | Description |
---|---|
System.Single |
Remarks
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.