Matrix.ZScore Method

function ZScore(const Src: TMtx): TMtx;

Transforms matrix into matrix of standardized data.

#NameTypeDescription
1SrcTMtx

Result: stored in self (calling object), returns self for chaining

Remarks:

The routine uses Data matrix and transforms it into ZScore matrix of standardized data (the so called Z Scores). The standardization of each column (variable) is made by subtracting its mean and dividing by its standard deviation:

Z(Column) = (Column - Mean(Column))/StdDev(Column)

Examples
var Data, Res: Matrix;
begin
    Data.SetIt(3,3,false,[1,2,3,
        4,5,6,
        7,100,12]);
    Res.ZScore(Data);
    // Res = (-1        -0,604  -0,873,
    //            0     -0,55   -0,218
    //            1      1,154   1,091)
end;