Class PerceptronModelWriter

Namespace
NOpenNLP.Tools.Ml.Perceptron
Assembly
NOpenNLP.Tools.dll

Abstract parent class for Perceptron writers. It provides the persist method which takes care of the structure of a stored document, and requires an extending class to define precisely how the data should be stored.

public abstract class PerceptronModelWriter : AbstractModelWriter, IDisposable
Inheritance
PerceptronModelWriter
Implements
Derived
Inherited Members

Constructors

PerceptronModelWriter(AbstractModel)

protected PerceptronModelWriter(AbstractModel model)

Parameters

model AbstractModel

Fields

OUTCOME_LABELS

protected string[] OUTCOME_LABELS

Field Value

string[]

PARAMS

protected Context[] PARAMS

Field Value

Context[]

PRED_LABELS

protected string[] PRED_LABELS

Field Value

string[]

Methods

ComputeOutcomePatterns(ComparablePredicate[])

protected virtual IList<IList<ComparablePredicate>> ComputeOutcomePatterns(ComparablePredicate[] sorted)

Parameters

sorted ComparablePredicate[]

Returns

IList<IList<ComparablePredicate>>

Persist()

Writes the model to disk, using the WriteX() methods provided by extending classes.

If you wish to create a PerceptronModelWriter which uses a different structure, it will be necessary to override the persist method in addition to implementing the WriteX() methods.

public override void Persist()

SortValues()

protected virtual ComparablePredicate[] SortValues()

Returns

ComparablePredicate[]