classPiiMatrixNormalizer
#include <PiiMatrixNormalizer.h>
Scale the values in a matrix so that its values are limited to a predefined range.
Inherits PiiDefaultOperation
Description
Inputs
Outputs
Properties
|
double
|
The minimum value in the output matrix. |
|
double
|
Mean of the output matrix. |
|
double
|
The minimum value in the output matrix. |
|
Normalization mode. |
|
|
int
|
The output type. |
|
double
|
Variance of the output matrix. |
Public types
|
enum
|
{ NormalizeMinMax, NormalizeMeanVar }
Normalization modes. |
Constructors and destructor
Public member functions
|
virtual void
|
(
Checks the operation for execution. |
|
double
|
( )
|
|
double
|
( )
|
|
double
|
( )
|
|
int
|
( )
|
|
void
|
(
|
|
void
|
(
|
|
void
|
(
|
|
void
|
|
|
void
|
(
|
|
void
|
(
|
|
double
|
( )
|
Protected member functions
|
virtual void
|
( )
Executes one round of processing. |
Property details
-
double max
[read, write]The minimum value in the output matrix.
Used in
NormalizeMinMaxmode. Default is one. -
double mean
[read, write]Mean of the output matrix.
Used in
NormalizeMeanVarmode. Default is zero. -
double min
[read, write]The minimum value in the output matrix.
Used in
NormalizeMinMaxmode. Default is zero. -
NormalizationMode normalizationMode
[read, write]Normalization mode.
Default is
NormalizeMinMax. -
int outputType
[read, write]The output type.
See PiiYdin::MatrixTypeId for valid values. Only numeric matrix types are allowed. The default is
PiiYdin::DoubleMatrixType. -
double variance
[read, write]Variance of the output matrix.
Used in
NormalizeMeanVarmode if non-zero. Ifvarianceis set to zero, only the mean value will be changed. Default is one.
Enumeration details
-
enum NormalizationMode
Normalization modes.
-
NormalizeMinMax- scale the input matrix to fixed minimum and maximum values. -
NormalizeMeanVar- scale the input matrix to fixed mean and variance.
-
Function details
-
PiiMatrixNormalizer
() -
virtual void check
(- bool reset
[virtual]Checks the operation for execution.
This function creates a suitable flow controller by calling createFlowController(). It then sets the flow controller to the active processor and sets the processor as the input controller for all inputs.
If you change socket groupings in your overridden implementation, please call PiiDefaultOperation::check() after that. Otherwise, your new groupings will not be in effect.
Reimplemented from PiiDefaultOperation.
-
double max
() -
double mean
() -
double min
() -
NormalizationMode normalizationMode
() -
int outputType
() -
void setMax
(- double max
-
void setMean
(- double mean
-
void setMin
(- double min
-
void setNormalizationMode
-
void setOutputType
(- int outputType
-
void setVariance
(- double variance
-
double variance
() -
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.
Add a note
Not a single note added yet. Be the first, add yours.