Class NaiveBayesModelReader

Namespace
NOpenNLP.Tools.Ml.Naivebayes
Assembly
NOpenNLP.Tools.dll

Abstract parent class for readers of NaiveBayes.

public class NaiveBayesModelReader : AbstractModelReader
Inheritance
NaiveBayesModelReader
Derived
Inherited Members

Constructors

NaiveBayesModelReader(IDataReader)

public NaiveBayesModelReader(IDataReader dataReader)

Parameters

dataReader IDataReader

NaiveBayesModelReader(FileInfo)

public NaiveBayesModelReader(FileInfo file)

Parameters

file FileInfo

Methods

CheckModelType()

public override void CheckModelType()

ConstructModel()

Retrieve a model from disk. It assumes that models are saved in the following sequence:


NaiveBayes (model type identifier)
1. # of parameters (int)
2. # of outcomes (int)
* list of outcome names (String)
3. # of different types of outcome patterns (int)
* list of (int int[])
[# of predicates for which outcome pattern is true] [outcome pattern]
4. # of predicates (int)
* list of predicate names (String)

If you are creating a reader for a format which won't work with this (perhaps a database or xml file), override this method and ignore the other methods provided in this abstract class.

public override AbstractModel ConstructModel()

Returns

AbstractModel

The NaiveBayesModel stored in the format and location specified to this NaiveBayesModelReader (usually via its the constructor).