Into

Modules

Documentation

classPiiDistributionNormalizer

#include <PiiDistributionNormalizer.h>

An operation that divides incoming feature vectors by their sum.

Inherits PiiDefaultOperation

Description

This allows one to use differently scaled distributions in classifying statistical features.

Inputs

featuresa feature vector. Any numeric matrix.
boundariesan optional input that marks the boundaries of multiple feature vectors in a compound feature vector. This input is mostly used in conjunction with PiiFeatureCombiner. If this input is connected, each part of the compound feature vector will be separately normalized.

Outputs

featuresa normalized feature vector. PiiMatrix<double> or PiiMatrix<float>, depending on the doubleMode property. If the sum of the input vector is zero, it will not be normalized.

Properties

bool

A flag that determines the format of output vectors.

Constructors and destructor

Public member functions

bool
void
(
  • bool mode
)

Protected member functions

virtual void

Executes one round of processing.

Property details

  • bool doubleMode

    [read, write]

    A flag that determines the format of output vectors.

    The operation always outputs floating-point vectors. By default, the values are floats. If this flag is true, double accuracy is used.

Function details

  • PiiDistributionNormalizer

    ()
  • bool doubleMode

    ()
  • void setDoubleMode

    (
    • bool mode
    )
  • virtual void process

    ()
    [protected, virtual]

    Executes one round of processing.

    This function is invoked by the processor if the necessary preconditions for a new processing round are met. This function does all the necessary calculations to create output objects and sends them to output sockets.

    Calls to process(), syncEvent(), and setProperty() are synchronized and cannot occur simultaneously. PiiDefaultOperation ensures this by locking processLock() for reading before calling process().

    Note: With time-consuming operations, one should occasionally check that the operation hasn't been interrupted, i.e. that state() returns Running.

    Exceptions
    PiiExecutionException

    whenever an unrecoverable error occurs during a processing round, the operation is interrupted, or finishes execution due to end of input data.

    Reimplemented from PiiDefaultOperation.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.