Show / Hide Table of Contents

Class NormalBayesClassifier

Bayes classifier for normally distributed data

Inheritance
System.Object
DisposableObject
DisposableCvObject
Algorithm
StatModel
NormalBayesClassifier
Implements
ICvPtrHolder
Inherited Members
StatModel.GetVarCount()
StatModel.Empty()
StatModel.IsTrained()
StatModel.IsClassifier()
StatModel.Train(TrainData, Int32)
StatModel.Train(InputArray, SampleTypes, InputArray)
StatModel.CalcError(TrainData, Boolean, OutputArray)
StatModel.Predict(InputArray, OutputArray, StatModel.Flags)
Algorithm.Write(FileStorage)
Algorithm.Read(FileNode)
Algorithm.Save(String)
Algorithm.GetDefaultName()
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp.ML
Assembly: OpenCvSharp.dll
Syntax
public class NormalBayesClassifier : StatModel, ICvPtrHolder

Constructors

| Improve this Doc View Source

NormalBayesClassifier(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 Source

Create()

Creates empty model. Use StatModel::train to train the model after creation.

Declaration
public static NormalBayesClassifier Create()
Returns
Type Description
NormalBayesClassifier
| Improve this Doc View Source

DisposeManaged()

Releases managed resources

Declaration
protected override void DisposeManaged()
Overrides
DisposableObject.DisposeManaged()
| Improve this Doc View Source

DisposeUnmanaged()

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

Get()

Declaration
public override IntPtr Get()
Returns
Type Description
IntPtr
| Improve this Doc View Source

Load(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
| Improve this Doc View Source

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
| Improve this Doc View Source

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.

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX