NAME

statistics - create unit to compute statistics

PROTOTYPE

unitptr statistics( int n, unitptr dest)

ARGUMENTS

int n
dimensionality of input vectors
unitptr dest
host unit for newly created instance

RETURN VALUE:

unitptr u
pointer to newly created unit

INTERFACE OF CREATED UNIT:

X_in[n]:
(input field 0) first input vector X
Y_in[n]:
(input field 1) second input vector Y
X_out[n]:
(output field 0) average difference <X-Y>
Y_out[1]:
(output field 1) average mean square <(X-Y)^2> of difference
Z_out[1]:
(output field 2) variance <(X-<X>)^2> of input 1
out_3[1]:
(output field 3) variance <(Y-<Y>)^2> of input 2
out_4[1]:
(output field 4) correlation <(X-<X>)(Y-<Y>)> of inputs 1 and 2
out_5[1]:
(output field 5) normalized error <(X-<Y>)^2> (NRMSE)
out_6[n]:
average mean square of difference <(X_i-Y_i)^2> for each dimension
out_7[n]:
NRMSE 1 for each dimension
out_8[1]:
norm of current difference |X-Y|
out_9[n]:
current vector difference X-Y

EXECUTION OF CREATED UNIT:

See below.

INITIALIZATION:

The command ctrl_unit(mode,u) with mode=NST_I_ZERO or mode=NST_INIT restarts a new statistics computation.

DESCRIPTION:

Creates a unit with two input fields and 10 output fields. The created unit becomes a subunit of unit dest. Output values are defined as the following averages formed over all invocations of the unit since the last NST_INIT or its creation, whichever was more recent. The purpose of this routine is to provide a means for fast evaluation of basic statistic properties of data sets. If n is specified as a negative integer, all fields the number of pins of which is specified by n are created as packed fields with ABS(n) pins. All other fields remain unpacked.

FIELD MACROS:

(FieLD Macro STATistic unit)

    fldmSTAT_M_Dim out_0 /* [n] Mean per Dimension */
    fldmSTAT_RMS out_1 /* [1] Root Mean Square */
    fldmSTAT_VarX out_2 /* [1] Variance */
    fldmSTAT_VarY out_3 /* [1] */
    fldmSTAT_CorXY out_4 /* [1] Correlation */
    fldmSTAT_NRMS out_5 /* [1] Normalized RMS */
    fldmSTAT_MS_Dim out_6 /* [n] */
    fldmSTAT_NRMS_Dim out_7 /* [n] */
    fldmSTAT_CurrDiff_norm
                        out_8 /* [1] */
    fldmSTAT_CurrDiff_Dim
                        out_9 /* [n] */

FLOAT MACROS:

(Float Macro STATistic unit(unitptr u) Note diffence to FieLD macros above)

    fmSTAT_RMS(u) Y(u,1,0) /* [1] Root Mean Square */
    fmSTAT_VarX(u) Y(u,2,0) /* [1] Variance */
    fmSTAT_VarY(u) Y(u,3,0) /* [1] */
    fmSTAT_CorXY(u) Y(u,4,0) /* [1] Correlation */
    fmSTAT_NRMS(u) Y(u,5,0) /* [1] Normalized RMS */
    fmSTAT_CurrDiff_norm(u)
                        Y(u,8,0) /* [1] */

FILE:

nst_math.c

FILE

/local/homes/rhaschke/nst7/man/../o.linx86_64//../foldersrc/nst_math.c